History
Independence
India wrested its independence from Britain in 1947 after a long freedom struggle led largely by the Indian National Congress and its visionary leaders, especially, Mahatma Gandhi. From 1920, the freedom movement leaders began highly popular mass campaign against the British Raj using largely peaceful methods. India’s acquisition of independence resulted in the formation of two countries, India and Pakistan. Following the controversial partition of India, rioting broke out, leaving some 500,000 dead. Also, this period saw one of the largest mass migrations ever recorded in modern history, with a total of 12 million Hindus, Sikhs and Muslims moving between the newly created nations of India and Pakistan.

Colonial
The Europeans -- Portuguese, French, Dutch, Danish and British -- started arriving in the early 1600s after Vasco da Gama successfully discovered a new sea route from Europe to India in 1498. All of them held territories in India and made friends and enemies among India's rulers as they got more and more involved with Indian politics, but it was the British who eventually controlled most of India and finally made it one of their colonies. In 1617, the British East India Company was given permission by Mughal Emperor Jahangir to trade in India. In the aftermath of India’s First War of Independence in 1857, all power was transferred from the East India Company to the British Crown, which began to administer most of India as a colony; the company's lands were controlled directly and the rest through the rulers of what it called the Princely states.

Mughal
The Mughals came from Central Asia and soon held sway over most of the northern parts of the subcontinent. Mughal rulers introduced Central Asian art and architecture to India. In addition to the Mughals and various Rajput kingdoms, several independent Hindu states, such as the Vijayanagara Empire, the Maratha Empire, and the Ahom Kingdom, flourished simultaneously in southern, western, and north-eastern India, respectively. The Mughal Empire suffered a gradual decline in the early 18th century, which provided opportunities for the Afghans, Balochis, Sikhs, and Marathas to exercise control over large areas in the northwest of the subcontinent until the British East India Company gained ascendancy over South Asia.
