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 about 8,500 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, Maurya Empire gradually united the Indian sub-continent under Chandragupta Maurya, his son Bindusara and grandson 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 northern 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 northeastern India, the dominant power was the Ahom kingdom of Assam, among the few kingdoms to have resisted Mughal subjugation. Due to Mughal persecution, the Sikhs developed a martial traditionand established the Sikh Empire which stood until the Anglo-Sikh wars in the mid-19th century. 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 ruled much of India in the mid-18th century.
From the 16th century, European powers such as Portugal, the Netherlands, France, and Great Britain established trading posts and later took advantage of internal conflicts to establish colonies. By 1856, most of India had come under the control of the British East India Company. A year later, a nationwide insurrection of rebelling military units and kingdoms, known as India's First War of Independence or the Sepoy Mutiny, seriously challenged the Company's control but eventually failed. As a result of the instability, India was brought under the direct rule of the British Crown.
In the 20th century, a nationwide struggle for independence was launched by the Indian National Congress and other political organisations. A large part of the movement for independence was led by Mahatma Gandhi and the Indian National Congress, which led millions of people in several national campaigns of non-violent civil disobedience.
On 15 August 1947, India gained independence from British rule, but at the same time the Muslim-majority areas were partitioned to form a separate state of Pakistan.On 26 January 1950, India became a republic and a new constitution came into effect.
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.
India is a state armed with nuclear weapons; having conducted its first nuclear test in 1974, followed by another five tests in 1998. Beginning 1991, significant economic reforms have transformed India into one of the fastest-growing economies in the world, increasing its global clout.