The distant history of Lahore, now Pakistan’s second-largest city, is very obscure. Some say that it was founded by and named after Lava (or Loh), the son of Rama and Sita in the ancient Hindu epic Ramayana. There is some speculation that the modern name Lahore is derived from Lohawar (similar to nearby Peshawar), which means “The Fort of Loh.” Even today, inside the Lahore Fort there is a vacated Hindu temple dedicated to Lava.
Whatever its origins may be, Lahore has always been located on the left bank of the Ravi, the smallest of Punjab’s five rivers. For centuries, the people of Lahore have been able to use the river as a natural defence against invaders from the north (though it didn’t always work, as we’ll see!). The cool breeze from Kashmir in the north was cooled as it passed over the Ravi before it came to Lahore, providing some relief during the hot summer. The Ravi swelled in the summer to spread a thick layer of fertile clay in the area.
Lahore was ruled by Hindu (Brahmin) dynasties and culturally influenced by Buddhism prior to the arrival of Muslims, but it remained a relatively unimportant city in the region. Multan, to the south, was far more important. And so in 665 CE, just 32 years after Prophet Muhammad (s) passed away in Arabia, a military expedition under the Umayyad general Muhallab ibn Abi Sufrah passed through Kabul, Peshawar, and Lahore on its way to Multan. These were probably the first Muslims to ever see Lahore.
Muslims really made an impact in the region half a century later with Muhammad ibn Qasim’s conquest of Sindh in 711 CE. However, the decline of the Umayyads had already begun and the Muslim expansion came to a halt with Lahore just outside of its reach. In 982 CE, an anonymous Persian writer published a geography book (Hudud al-‘Alam) with a detailed description of Lahore as a small city with “impressive temples, large markets and huge orchards”.
At the time when this description was being written, important changes were happening in the Abbasid Empire that would forever change Lahore’s place in the Muslim world. At an unknown date in the early 11th century a Turkic Muslim of Ghazna named Mahmud (d. 1030) conquered Lahore and established a garrison there, making it the first major Muslim settlement in northern India. The Ghaznavids’ territory in Iran was soon taken over by the Seljuks, but they held on firmly to Lahore.
Mahmud was not only sought to legitimize his rule as a devout Sunni Muslim but also to patronize Persian culture. He therefore invited many Persian learned men to come work and settle in Lahore and the surrounding area. One outstanding example is that of al-Biruni (d. 1048): not only did he use his stay in Lahore as an opportunity to learn the Sanskrit language and write about Hindu religion and culture, but it was also here that he used trigonometric functions to accurately estimate the circumference of the earth.
Others who came to Lahore later on were the poet Mas’udi Salman (d. 1121), who helped spread the use of Farsi (Persian) in the region, and Hujwiri (d. 1077), a scholar who wrote a famous history of the Sufism (and the first treatise of Sufism ever written in Farsi). However, Ghaznavid power was by now declining, and in 1163 they lost Ghazna itself to the Seljuks, forcing them to move their capital to Lahore: the very first Indian-based Muslim state.
In 1186, Lahore was overrun by the Ghurids, another Turkic Muslim dynasty. Especially under leaders such as Qutb ad-Din Aybak and his son Iltutmish (d. 1236), The Ghurids used Lahore as a base for their invasions further into India. They soon established their rule across the Punjab and slowly made their way all the way to Bengal, making Delhi their capital. Lahore was thus ruled by the various dynasties of the Delhi Sultanate, though the local governors often held the real authority.
In 1241, Lahore was sacked by the Mongols. They moved on from the city, but returned again in 1253 to install a governor of their choice. The Mongols and the Muslim dynasties in Delhi constantly fought back-and-forth over Lahore. It was during this period of turmoil (in c. 1333) that the famous Moroccan traveller Ibn Battuta passed through the region on his way to visit Sultan Muhammad ibn Tughluq, who was inspired by the Syrian scholar and reformer Ibn Taymiyyah to valiantly resist the Mongols’ occupation of Lahore.
In 1398, Lahore submitted to Timur (Tamerlane) before he could invade and ravage it. Timur invaded all the way up to Delhi and then left the region for campaigns elsewhere, but he left his own men in-charge of Lahore. The descendents of one of these men, who by now ruled from Delhi, gave Lahore away to the Afghan Lodhi dynasty in 1441. The Lodhis loosely ruled Lahore for nearly another century, when they lost it (in 1520) to a descendent of Timur trying to revive his family’s legacy: Zahir ad-Din Babur. As it turned out, taking Lahore was Babur’s first step in creating the soon-to-be magnificent Mughal Empire.
At this point, Lahore had been under Muslim rule for nearly 500 years. However, it remained as it had always been: a city at the cross-roads for travellers, traders, invaders, scholars, and mystics. Life rarely changed for its Muslim and Hindu inhabitants as the authority over the city was tossed around. It would flourish under the Mughal dynasty, who raised its importance to such a degree that it was here the movement to create a Pakistan officially began in March 1940.