During the last quarter of the twelfth century, Muhammad of Ghor invaded the Indo-Gangetic Plain, conquering in succession Ghazni, Multan, Sindh, Lahore, and Delhi. Qutb ud-Din, one of his generals, proclaimed himself sultan of Delhi and established the first dynasty of the Delhi Sultanate, the Mamluk Dynasty (mamluk means "slave") in 1211 (however, the Delhi Sultanate is traditionally held to have been founded in 1206). The territory under control of the Muslim rulers in Delhi expanded rapidly. By mid-century, Bengal and much of central India was under the Delhi Sultanate. Iltutmish (1210-35) and Balban (1266-87) were among the dynasty's most well-known rulers. Faced with revolts by conquered territories and rival families, the Malmuk dynasty came to an end in 1290.
As Muslims extended their rule into southern India, only the Hindu kingdom of Vijayanagar remained immune, until it too fell in 1565. Although some kingdoms remained independent of Delhi in the Deccan and in Gujarat, Malwa (central India), and Bengal, almost all of the area in presentday Pakistan came under the rule of Delhi.
The sultans of Delhi enjoyed cordial, if superficial, relations with Muslim rulers in the Near East but owed them no allegiance. The sultans based their laws on the Quran and the sharia and permitted non-Muslim subjects to practice their religion only if they paid jizya or head tax. The sultans ruled from urban centers--while military camps and trading posts provided the nuclei for towns that sprang up in the countryside. Perhaps the greatest contribution of the sultanate was its temporary success in insulating the subcontinent from the potential devastation of the Mongol invasion from Central Asia in the thirteenth century. The sultanate ushered in a period of Indian cultural renaissance resulting from the stimulation of Islam by Hinduism. The resulting "Indo-Muslim" fusion left lasting monuments in architecture, music, literature, and religion. The sultanate suffered from the sacking of Delhi in 1398 by Timur (Tamerlane) but revived briefly under the Lodhis before it was conquered by the Mughals.