Mohandas Gandhi's storied history of resistance included many stints in jail, starting with a two-month imprisonment in 1907 in South Africa, where he was working to end discrimination against Indians living there. He was arrested for urging them to ignore a law requiring Indians to be registered and fingerprinted. While in jail, Gandhi read Henry David Thoreau's Civil Disobedience, which would become a major part of his philosophy upon his return to India. Back in his home country, Gandhi was put behind bars several times for his movement to end British rule. In 1922 he was tried for the last time by the British government for "bringing or attempting to excite disaffection towards His Majesty's Government established by law in British India." He pleaded guilty to all charges and was sentenced to six years, of which he served two before being released for an emergency appendectomy. India achieved independence on Aug. 15, 1947, five months before Gandhi was assassinated. His moniker, Mahatma, meant "the great one."