The city of Lahore had existed during the ancient times. References to this city can be found in Ptolemy’s Geographia, which is written about AD I50. It refers to it as ‘Labokla’ and locates it with reference to the Indus, Ravi, Jhelum and Chenab rivers.
The Muslims conquered Lahore in 713 CE under the leadership of Muhammad bin Qasim, who was dispatched by the Umayyad Khaleefah Al-Walid ibn Abd al-Malik to make inroads to India. Muhammad bin Qasim conquered Punjab, and most of the present Pakistan from Kashmir to the Arabian Sea.
Later, Sultan Mahmud of Ghazni placed it under the rule of his governor, Malik Ayaz. When Sultan Qutub-uddin Aybak was crowned in 1206, he became the first Muslim Sultan of the subcontinent. From 1524 to 1752 Lahore was part of the Mughal Empire.
During Akbar’s rule, Lahore was the capital of the empire from 1584 to 1598. During this time a massive fort, the Lahore Fort, was built on the remains of an older fort in the 1560s. This fort was later extended by Jahangir, a Mughal emperor who is now buried in the city. Shah Jahan, his son, was born in Lahore and is famous for building the world-renowned Taj Mahal in India. He, like his father, extended Lahore Fort and built many other structures in the city, showering more affection on his hometown than any other city. The last of the Mughals, Aurangzeb, ruling from 1658 to 1707, built the city's most famous monuments, the Badshahi Masjid and the Alamgiri Gate next to the Lahore Fort.
With the decline of the Mughal Empire, Lahore was captured by Sikh ruler Ranjit Singh, who declared himself Maharajah of the Punjab. Ranjit troops to desecrate many of the city’s beautiful Islamic shrines, including the Badshahi Mosque. Sikhs ruled Lahore from 1799 to 1849, making it the capital of their empire. However the last Anglo-Sikh war resulted in a British victory, bringing Lahore under the rule of the British crown.
The famous Lahore Resolution was passed in the city in 1940 that called for the creation of a separate Muslim state. Pakistan came into existence in 1947 with the end of the British Empire.