From the late 18th century to the mid-19th century, large areas of India were annexed by the British East India Company of British Empire. Dissatisfaction with Company rule led to the Indian Rebellion of 1857, after which the British provinces of India were directly administered by the British Crown and witnessed a period of both rapid development of infrastructure and economic stagnation. During the first half of the 20th century, a nationwide struggle for independence was launched with the leading party involved being the Indian National Congress which was later joined by other organizations. The subcontinent gained independence from the United Kingdom in 1947, after the British provinces were partitioned into the dominions of India and Pakistan and the princely states all acceded to one of the new states.