Great Britain formally took possession of India as a colony after suppressing the Indian Mutiny, or Rebellion, of 1857, and the country later won its independence in 1947. The 20th-century Indian independence movement, led by Mahatma Gandhi and comprised primarily of nonviolent resistance to British rule, led the 1947 partition of the former colony into the independent nations of the Republic of India and the Islamic Republic of Pakistan.
Although under a system of direct and indirect British rule after the Mutiny of 1857, the British annexation of India was an incremental process that began in the previous century as the British East India Company's sphere of influence grew with regard to India's economy and internal politics.
Some historians consider the British East India Company's greater involvement in Indian affairs, such as education, culture and social reforms, to be the actual start of British rule. The Mutiny of 1857 was an armed response to the British trading company's growing takeover of Indian politics and society. The rebellion's suppression by force led directly to the formal declaration of India as a British Colony.
The beginnings of the Indian nationalist movement can be traced to the formation of the Indian National Congress in 1885. Increased calls for Indian self-rule came in the wake of World War I, and after the end of World War II, the war-weakened British government partitioned its former colony into the self-ruling states of India and Pakistan in 1947.