Indian Prime Minister Narendra Modi is set to mark a historic train journey by Indian independence leader Mohandas K. Gandhi during the final day of his South African visit.

Modi's ride will commemorate the incident in which a young Gandhi in 1893 was ejected from a South African train when he refused an order to move from a first-class carriage because of his race.

The encounter shaped Gandhi's decision to resist racial segregation and other injustices with nonviolent protest, first while living in South Africa and then in India.

Modi has already met with members of South Africa's community of Indian origin, which numbers more than 1 million.

Modi moves on to Tanzania later Saturday and then to Kenya on a four-nation tour meant to raise India's profile in Africa.