India's first major civilisation flourished for a thousand years from around 2500 BC along the Indus River valley. Its great cities were Mohenjodaro and Harappa (in what is now Pakistan), ruled by priests and bearing the rudiments of Hinduism. Aryan invaders swept south from Central Asia between 1500 and 200 BC and controlled northern India, pushing the original Dravidian inhabitants south.
The invaders brought their own gods and cattle-raising and meat-eating traditions, but were absorbed to such a degree that by the 8th century BC the priestly caste had reasserted its supremacy. This became consolidated in the caste system, a hierarchy maintained by strict rules that secured the position of the Brahmin priests. Buddhism arose around 500 BC, condemning caste; it drove a radical swathe through Hinduism in the 3rd century BC when it was embraced by the Mauryan Emperor Ashoka, who controlled huge tracts of India.
A number of empires, including the Guptas, rose and fell in the north after the collapse of the Mauryas. Hinduism underwent a revival from 40 to 600 AD, and Buddhism began to decline. The north of India broke into a number of separate Hindu kingdoms after the Huns invasion; it was not really unified again until the coming of the Muslims in the 10th and 11th centuries. The far south, whose prosperity was based on trading links with the Egyptians, Romans and Southeast Asia, was unaffected by the turmoil in the north, and Hinduism's hold on the region was never threatened. In 1192 the Muslim Ghurs arrived from Afghanistan. Within 20 years the entire Ganges basin was under Muslim control, though Islam failed to penetrate the south. Two great kingdoms developed in what is now Karnataka: the mighty Hindu kingdom of Vijayanagar, and the fragmented Bahmani Muslim kingdom.
Mughal emperors marched into the Punjab from Afghanistan, defeated the Sultan of Delhi in 1525, and ushered in another artistic golden age. The Maratha Empire grew during the 17th century and gradually took over more of the Mughals' domain. The Marathas consolidated control of central India until they fell to the last great imperial power, the British.
The British were not, however, the only European power in India: the Portuguese had controlled Goa since 1510 and the French, Danes and Dutch also had trading posts. By 1803, when the British overwhelmed the Marathas, most of the country was under the control of the British East India Company, which had established its trading post at Surat in Gujarat in 1612.
The company treated India as a place to make money, and its culture, beliefs and religions were left strictly alone. Britain expanded iron and coal mining, developed tea, coffee and cotton plantations, and began construction of India's vast rail network. They encouraged absentee landlords because they eased the burden of administration and tax collection, creating an impoverished landless peasantry - a problem which is still chronic in Bihar and West Bengal. The Uprising in northern India in 1857 led to the demise of the East India Company, and administration of the country was handed over to the British government.
Opposition to British rule began in earnest at the turn of the 20th century. The 'Congress' which had been established to give India a degree of self-rule now began to push for the real thing. In 1915, Gandhi returned from South Africa, where he had practised as a lawyer, and turned his abilities to independence, adopting a policy of passive resistance, or satyagraha.
WWII dealt a deathblow to colonialism and Indian independence became inevitable. Within India, however, the large Muslim minority realised that an independent India would be Hindu-dominated. Communalism grew, with the Muslim League, led by Muhammad Ali Jinnah, speaking for the overwhelming majority of Muslims, and the Congress Party, led by Jawaharlal Nehru, representing the Hindu population. The bid for a separate Muslim nation was the biggest stumbling block to Britain granting independence.
Faced with a political stand-off and rising tension, Viceroy Mountbatten reluctantly decided to divide the country and set a rapid timetable for independence. Unfortunately, the two overwhelmingly Muslim regions were on opposite sides of the country - meaning the new nation of Pakistan would be divided by a hostile India. When the dividing line was announced, the greatest exodus in human history took place as Muslims moved to Pakistan and Hindus and Sikhs relocated to India. Over 10 million people changed sides and even the most conservative estimates calculate that 250,000 people were killed. On 30 January 1948, Gandhi, deeply disheartened by Partition and the subsequent bloodshed, was assassinated by a Hindu fanatic.
Following the trauma of Partition, India's first prime minister Jawaharlal Nehru championed a secular constitution, socialist central planning and a strict policy of nonalignment. India elected to join the Commonwealth, but also increased ties with the USSR - partly because of conflicts with China and partly because of US support for arch-enemy Pakistan, which was particularly hostile to India because of its claim on Muslim-dominated Kashmir. There were clashes with Pakistan in 1965 and 1971. India's next prime minister of stature was Nehru's daughter Indira Gandhi, who was elected in 1966. She is still held in high esteem, but is remembered by some for meddling with India's democratic foundations by declaring a state of emergency in 1975. Mrs Gandhi was assassinated by her Sikh bodyguards in 1984 as a reprisal for using the Indian Army to flush out armed Sikh radicals from the Golden Temple in Amritsar. The Gandhis' dynastic grip on Indian politics continued when her son, Rajiv was swept into power.
Rajiv brought new and pragmatic policies to the country. Foreign investment and the use of modern technology were encouraged, import restrictions were eased and many new industries were set up. These measures projected India into the 1990s and out of isolationism, but did little to stimulate India's mammoth rural sector. Rajiv was assassinated on an election tour by a supporter of Sri Lanka's Tamil Tigers. The dangers of communalism in India were clearly displayed in 1992, when a Hindu mob stormed and destroyed a mosque built on the alleged site of Rama's birth in Ayodhya. The Hindu nationalist Bharatiya Janata Party (BJP) has been keen to exploit such opportunities, and has led several disparate coalitions to power in recent years. Despite the dangers of playing communalist politics, the BJP's traditionalist Hindu stance has attracted voters concerned about retaining traditional values during the sudden onslaught of modern global influences.
In 1998 India tested its first nuclear weapons. Despite international outrage, the nuclear tests were met with widespread jubilation and support for the BJP. But by April 1999 PM Vajpayee had lost his majority and was forced into a vote of confidence, which he lost by one vote. Sonia Gandhi, Rajiv Gandhi's widow, was expected to lead the Congress Party to victory, but she was unable to secure a coalition and India was forced to the polls for the third time in as many years. The BJP was returned to government with a slimmer lead.
Since then, tensions with Pakistan have flared periodically despite top-level attempts at rapprochement. In January 2001 an earthquake in Gujarat killed about 20,000 people and left more than half a million homeless. In December of that, gunmen storming the national parliament killed 13 people, while hundreds were killed in Gujarat a year after the earthquake in conflicts between Hindus and Muslims.