The history of India includes the prehistoric settlements and societies in the Indian subcontinent; the advancement of civilisation from the Indus Valley Civilisation to the eventual blending of the Indo-Aryan culture to form the Vedic Civilisation; the rise of Hinduism, Jainism, and Buddhism; the onset of a succession of powerful dynasties and empires for more than three millennia throughout various geographic areas of the Indian subcontinent, including the growth of Muslim dominions during the Medieval period intertwined with Hindu powers; the advent of European traders and privateers, resulting in the establishment of British India; and the subsequent independence movement that led to the Partition of India and the creation of the Republic of India.
Archaeological evidence of anatomically modern humans in the Indian subcontinent is estimated to be as old as 73,000–55,000 years with some evidence of early hominids dating back to about 500,000 years ago. Considered a cradle of civilisation, the Indus Valley civilisation, which spread and flourished in the north-western part of the Indian subcontinent from 3300 to 1300 BCE, was the first major civilisation in South Asia. A sophisticated and technologically advanced urban culture developed in the Mature Harappan period, from 2600 to 1900 BCE. This civilisation collapsed at the start of the second millennium BCE and was later followed by the Iron Age Vedic Civilisation. The era saw the composition of the Vedas, the seminal texts of Hinduism, coalesce into Janapadas (monarchical, state-level polities), and social stratification based on caste. The Later Vedic Civilisation extended over the Indo-Gangetic plain and much of the Indian subcontinent, as well as witnessed the rise of major polities known as the Mahajanapadas (large, urbanised states). In one of these kingdoms, Magadha, Gautama Buddha and Mahavira propagated their Śramaṇic philosophies during the fifth and sixth centuries BCE.
Most of the Indian subcontinent was conquered by the Maurya Empire during the 4th and 3rd centuries BCE. From the 3rd century BCE onwards Prakrit and Pali literature in the north and the Tamil Sangam literature in southern India started to flourish. Wootz steel originated in south India in the 3rd century BCE and was exported to foreign countries. During the Classical period, various parts of India were ruled by numerous dynasties for the next 1,500 years, among which the Gupta Empire stands out. This period, witnessing a Hindu religious and intellectual resurgence, is known as the classical or "Golden Age of India". During this period, aspects of Indian civilisation, administration, culture, and religion (Hinduism and Buddhism) spread to much of Asia, while kingdoms in southern India had maritime business links with the Middle East and the Mediterranean. Indian cultural influence spread over many parts of Southeast Asia, which led to the establishment of Indianised kingdoms in Southeast Asia (Greater India).
The most significant event between the 7th and 11th century was the Tripartite struggle centred on Kannauj that lasted for more than two centuries between the Pala Empire, Rashtrakuta Empire, and Gurjara-Pratihara Empire. Southern India saw the rise of multiple imperial powers from the middle of the fifth century, most notably the Chalukya, Chola, Pallava, Chera, Pandyan, and Western Chalukya Empires. The Chola dynasty conquered southern India and successfully invaded parts of Southeast Asia, Sri Lanka, the Maldives, and Bengal in the 11th century. The early medieval period Indian mathematics influenced the development of mathematics and astronomy in the Arab world and the Hindu numerals were introduced.
Islamic conquests made limited inroads into modern Afghanistan and Sindh as early as the 8th century, and the Delhi Sultanate was founded in 1206 CE by Central Asian Turks who ruled a major part of the northern Indian subcontinent in the early 14th century, but declined in the late 14th century. This period also saw the emergence of several powerful Hindu states, notably Vijayanagara, Gajapati, and Ahom, as well as Rajput states, such as Mewar. The 15th century saw the advent of Sikhism. The early modern period began in the 16th century, when the Mughal Empire conquered most of the Indian subcontinent. The Mughals suffered a gradual decline in the early 18th century, which provided opportunities for the Marathas, Sikhs and Mysoreans to exercise control over large regions of the subcontinent.
From the late 18th century to the mid-19th century, large areas of India were annexed by the British East India Company of the 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 rapid development of infrastructure, economic decline and major famines. During the first half of the 20th century, a nationwide struggle for independence was launched, led by the Indian National Congress, which was later joined by other organisations. The Indian 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.