Early Muslim period in Lahore
The early Muslim period refers to the start of Muslim rule in the history of Lahore. In 664/682, the city was besieged by Muslim forces led by Muhallab ibn Abi Sufra.
Few references to Lahore remain from before its capture by Sultan Mahmud of Ghazni in the eleventh century. The sultan took Lahore after a long siege and battle in which the city was torched and depopulated. In 1021, Sultan Mahmud appointed Malik Ayaz to the throne and made Lahore the capital of the Ghaznavid Empire. As the first Muslim governor of Lahore, Ayaz rebuilt and repopulated the city. He added many important features, such as city gates and a masonry fort, built in 1037–1040 on the ruins of the previous one, which had been demolished in the fighting (as recorded by Munshi Sujan Rae Bhandari, author of the Khulasat-ut-Tawarikh in 1695–96). The present Lahore Fort stands on the same location. Under Ayaz's rule, the city became a cultural and academic center, renowned for poetry. The tomb of Malik Ayaz can still be seen in the Rang Mahal commercial area of town.
After the fall of the Ghaznavid Empire, Lahore was ruled by various Muslim Empires known as the Delhi Sultanate, including the Khaljis, Tughlaqs, Sayyid, Lodis as well as the Surids and Mughals. When Sultan Qutb-ud-din Aibak was crowned here in 1206, he became the first Muslim sultan in South Asia.