Stone Age rock shelters with paintings at the Bhimbetka rock shelters in Madhya Pradesh are the earliest known traces of human life in India. The first known permanent settlements appeared over 9,000 years ago and gradually developed into the Indus Valley Civilisation, dating back to 3400 BCE in western India. 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 BCE. From around 550 BCE, many independent kingdoms and republics known as the Mahajanapadas were established across the country.
In the third century BCE, most of South Asia was united into the Maurya Empire by Chandragupta Maurya and flourished under Ashoka the Great. From the third century CE, the Gupta dynasty oversaw the period referred to as ancient "India's Golden Age". Empires in Southern India included those of the Chalukyas, the Cholas and the Vijayanagara Empire. Science, technology, engineering, art, logic, language, literature, mathematics, astronomy, religion and philosophy flourished under the patronage of these kings.
Following invasions from Central Asia between the 10th and 12th centuries, much of North India came under the rule of the Delhi Sultanate and later the Mughal Empire. Under the rule of Akbar the Great, India enjoyed much cultural and economic progress as well as religious harmony. Mughal emperors gradually expanded their empires to cover large parts of the subcontinent. However, in North-Eastern India, the dominant power was the Ahom kingdom of Assam, among the few kingdoms to have resisted Mughal subjugation. The first major threat to Mughal imperial power came from a Hindu Rajput king Maha Rana Pratap of Mewar in the 16th century and later from a Hindu state known as the Maratha confederacy, that dominated much of India in the mid-18th century.
Since independence, India has faced challenges from religious violence, casteism, naxalism, terrorism and regional separatist insurgencies, especially in Jammu and Kashmir and Northeast India. Since the 1990s terrorist attacks have affected many Indian cities. India has unresolved territorial disputes with the People's Republic of China, which, in 1962, escalated into the Sino-Indian War, and with Pakistan, which resulted in wars in 1947, 1965, 1971 and 1999. India is a founding member of the United Nations (as British India) and the Non-Aligned Movement.
In 1974, India conducted an underground nuclear test and five more tests in 1998, making India a nuclear state. Beginning in 1991, significant economic reforms have transformed India into one of the fastest-growing economies in the world, increasing its global clout.