A third war between the two countries in 1971 resulted in East Pakistan becoming the separate nation of Bangladesh.
Nonviolent resistance to British colonialism led by Mohandas GANDHI and Jawaharlal NEHRU brought independence in 1947.
The subcontinent was divided into the secular state of India and the smaller Muslim state of Pakistan.
Mughal emperors gradually expanded their Kingdoms to cover large parts of the subcontinent.
Nevertheless, several indigenous kingdoms, such as the Vijayanagara Empire, flourished, especially in the south.
It was followed by the Vedic period, which laid the foundations of Hinduism and other cultural aspects of early Indian society, and ended in the 500s BC.
From around 550 BCE, many independent kingdoms and republics known as the Mahajanapadas were established across the country.
In 1989, a Janata Dal-led National Front coalition in alliance with the Left Front coalition won the elections but managed to stay in power for only two years. The years 1996–1998 were a period of turmoil in the federal government with several short-lived alliances holding sway.
The BJP formed a government briefly in 1996, followed by the United Front coalition.
The dispute between the countries over the state of Kashmir is ongoing, but discussions and confidence-building measures have led to decreased tensions since 2002.
Despite impressive gains in economic investment and output, India faces pressing problems such as significant overpopulation, environmental degradation, extensive poverty, and ethnic and religious strife.
Stone Age rock shelters with paintings at the Bhimbetka rock shelters in Madhya Pradesh are the earliest known traces of human life in India.