The Delhi Sultanate was a Muslim kingdom based mostly in Delhi that stretched over large parts of the Indian subcontinent for 320 years (1206–1526). Five dynasties ruled over Delhi Sultanate sequentially, the first four of which were of Turkic origin and the last was the Afghan Lodi. The Lodi dynasty was replaced by the Mughal dynasty. The five dynasties were the Mamluk dynasty(1206–90); the Khilji dynasty (1290–1320); the Tughlaq dynasty (1320–1414); the Sayyid dynasty (1414–51); and the AfghanLodi dynasty (1451–1526).Qutb-ud-din Aibak, a former slave of Muhammad Ghori, was the first sultan of Delhi and his dynasty conquered large areas of northern India. Afterwards the Khilji dynasty was also able to conquer most of central India, but both failed to unite the Indian subcontinent. Delhi sultanate is also noted for being one of the few states to repel an attack from the Mongol Empire. Delhi Sultanate reached its peak in terms of geographical reach, during the Tughlaq dynasty, covering most of Indian subcontinent.The Delhi Sultanate declined thereafter, with continuing Hindu-Muslim wars, and kingdoms such as Vijayanagara Empire re-asserting their independence as well as new Muslim sultanates such as Bengal Sultanate breaking off.The Sultanate caused destruction and desecration of ancient temples of South Asia, as well as led to the emergence of Indo-Islamic architecture. The Delhi Sultanate is the era that enthroned one of the few female rulers in Islamic history, Razia Sultana from 1236 to 1240. In 1526 the Delhi Sultanate fell and was replaced by the Mughal Empire.