About a third of the Indians in Natal province(Africa) were contractual labourers working in mines, plantations and railways. They had been brought from India on a five-year contract, with the promise of land and rights at the end of the contract. About 30,000 were ‘free’ Indians who had completed ‘an agreement’ and who were living with their families.⁣

After Boer War Natal government started feeling that the existence of free Indians would undermine white leadership so they removed the voting rights of the few free Indians who had qualified. A three-pound tax was imposed on all ‘free Indians’ to force them to re-indenture or return to India.⁣

Gandhi opposed this discriminatory law by making representations to the authorities, providing free legal advice to contractual labourers, leading delegations to the British government and writing letters in the press defending the rights of Indians.⁣

In June 1906, Transvaal government issued ordinance which required every Indian man, woman and child above the age of eight to register his or her name with the registrar of Asiatics and take out a certificate of registration. Failure to do so was a criminal offence. ⁣

In January 1908, Gandhi appeared in court after disobeying an order to leave Transvaal within 48 hours. He was asked for the harshest penalty of six months’ imprisonment with hard labour for organizing defiance of the Registration Act.

The magistrate, however, awarded him two months’ simple imprisonment. This was the first of many imprisonments of Gandhi and the first non- violent challenge to the racist regime of South Africa. He called it satyagraha or soul force.⁣

Again in March 1913, The Cape Supreme Court ruled that all marriages not performed according to Christian rites were illegal, that is, most Indian marriages were invalid. That made the children illegitimate and deprived them of inheritance. Naturally, Indians in South Africa were deeply agitated. ⁣

In 1912, Gopal Krishna Gokhale had visited South Africa and expressed hope that Gandhi would shift to India soon. In 1913, Gandhi wrote to Gokhale that he would fight till his death in South Africa.⁣