The origins of Lahore are shrouded in the mists of time and legend. Tradition has it that Lahore was settled by Loh, Ramchandar’s older son. The city first appears in historical records in the second century AD" under a name associated with its mythological origins. It is mentioned in the seventh century by the Chinese pilgrim Hiuen Tsang, in the ninth century by al-Baladhuri, in a tenth-century Arabic manuscript by an unknown Central Asian author, and in the eleventh century in the Kitab al-Hind by Abdur Rahman al-Biruni. Lahore was occupied by the Ghaznavids in the early eleventh century after their long conflict with the Hindu Shahi dynasty came to an end in 1002.
Source
From The Walled City of Lahore in Heritage of the Mughal World (Philip Jodidio, editor)
Khan, Masood. "The Walled City of Lahore". In
Heritage of the Mughal World, edited by Philip Jodidio, 223-228. Munich: Prestel, 2015.
Prestel and the Aga Khan Trust for Culture