During the AD 300s, the Gupta Dyanasty emerged and united much of northern India. The Gupta Empire bonded the disjointed tribes that once inhabited the region and formed a cohesive political and religious entity. Hinduism became a more coherent and codified religion because of the efforts of the Gupta kings, who fused elements of Buddhism with Hinduism and emphasized the theistic nature of the religion because of the efforts of the Gupta kings, who fused elements of Buddhism with Hinduism and emphasized the theistic nature of the religon, particularly the role of the god Vishnu.
In
320 a Magadha raja named Chandragupta I (reigned 320-330?), who
had completed the conquest of neighboring territories, founded a new
imperial regime and the Gupta dynasty. His grandson Chandragupta II
(reigned 375?-413) vastly expanded the realm, subjugating all of the
subcontinent north of the Narmada River. Under the rulers of the Gupta
dynasty, which reigned for 160 years, Indian culture reached new
heights. The period was one of sustained peace, steady
economic advance, and intellectual accomplishment, particularly in art, music,
and literature. Equally important, Hinduism, which had long been in a state
of decline, experienced a robust renaissance through absorption of some features
of Buddhism.
Toward the close of the 5th century, Hunnish invaders, often referred to as the White Huns, pushed into India from Central Asia. The Gupta Empire broke up under the blows of these marauders, whose supremacy went unchallenged for nearly a century. Foreign military reverses, notably at the hands of the Turks about 565, finally undermined the Hunnish power in India. Among the contemporary descendants of the Huns who remained on the subcontinent are certain tribal groups of modern Rajasthan. Another powerful kingdom was founded in northern India, in 606, by Harsha, the last Hindu monarch of consequence in Indian national history. During his reign, Harsha secured control of almost the entire mainland and attempted, without success, to conquer the Deccan. The dominions of Harsha disintegrated into a multiplicity of warring petty states and principalities following his death. This anarchic state of affairs, which had also been generally characteristic of the situation on the peninsula, prevailed throughout India until the beginning of the 11th century.
As the prolonged period of internal strife in India drew to a close, a new power, solidly united under Islam, had arisen in western Asia. The new power was Khorasan, previously a Samanid province, which had been transformed into an independent kingdom by Mahmud of Ghaznì (reigned 999-1030). A capable warrior whose sovereignty over Khorasan had been recognized by the caliph of Baghdad, Mahmud in 1000 launched the first of 17 consecutive expeditions across the Afghan frontier into India. These incursions were marked by frequent victories over the disunited Indians, and by 1025 Mahmud had sacked many western Indian cities, including the fabulously wealthy port of Somnath, and had annexed the Punjab to his empire. The most successful of the Muslim rulers after Mahmud was Muhammad of Ghur, whose reign began in 1173. Regarded by most historians as the real founder of Muslim power in India, he initiated his campaigns of conquest in 1175 and, in the course of the next three decades, subjugated all of the Indo-Gangetic plain west of Benares (now Varanasi). On the death of Muhammad of Ghur, Qutb-ud-Din Aybak, his viceroy of Delhi and a former slave, proclaimed himself sultan. The Slave dynasty founded by Qutb-ud-Din, its only outstanding ruler, endured until 1288.
Another capable Muslim, Ala-ud-Din (reigned 1296-1316), second of the succeeding Khalji dynasty, consolidated the Indian realm by conquering the Deccan. Before the end of his reign, the Mongols began to infiltrate the northern frontiers of the Muslim dominions in India. Muhammad Tughluq, the last Delhi sultan of importance, completely alienated both the Muslims and the subject Hindus by his cruelty and religious fanaticism. As the empire was torn by revolutionary strife, some provinces, notably Bengal, seceded.
The internal turmoil increased after Tughluq's death; in 1398, when the Mongol conqueror Tamerlane led his armies into India, he met little organized resistance. Climaxing his victorious invasion, Tamerlane sacked and destroyed Delhi and massacred its inhabitants. The Mongol conqueror withdrew from India shortly after the sack of Delhi, leaving the remnants of the empire to Mahmud (reigned 1399-1413), the last of the Tughluqs. Mahmud was succeeded, in 1414, by the first of the Sayyids, a dynasty that was later driven from power by Bahlol (reigned 1451-1489), founder of the Lodi line of kings. The Lodi dynasty, generally weak and ineffectual, was terminated in 1526. In that year Babur, a descendant of Tamerlane and the founder of the great Mughal dynasty, climaxed a series of raids into India by defeating the Lodi army. Babur soon occupied Agra, the Lodi capital, and proclaimed himself emperor of the Muslim dominions. Within four years of his initial victory, Babur controlled a large part of the Indian mainland.