For three hundred years Punjab was the frontier province of the Delhi Sultanate, garrisoned against the Mongols, who raided repeatedly through the thirteenth and fourteenth centuries and sacked Lahore in 1241.
Multan and Dipalpur were the key commands. Ghiyasuddin Tughlaq began as governor of Dipalpur. Firoz Shah Tughlaq cut canals from the Sutlej and the Yamuna and founded Hisar and Firozpur.
Timur invaded in 1398, sacked Delhi and went back through the Punjab. Najabat's later Punjabi vaar on Nadir Shah belongs to the same genre of remembering what came down that road.
The Lodhis, an Afghan dynasty, ruled from 1451. Daulat Khan Lodhi was governor of the Jalandhar Doab, which included Sultanpur, where Guru Nanak Dev Ji worked in his storehouse, and was later governor of Lahore.
Daulat Khan invited Babur in. The Lodhi Sultanate fell at Panipat in 1526.
Guru Nanak Dev Ji's Babarvani, four hymns in the Guru Granth Sahib Ji, describes Babur's invasion and the sack of Saidpur, Eminabad, from the point of view of the people it happened to. It is contemporary eyewitness testimony of an event in 1520 and it is in a scripture.
Punjab was the sultanate's frontier province and its western districts were the first line against the Mongol invasions of the thirteenth and fourteenth centuries.
Multan, Dipalpur, Lahore and Sirhind were the administrative centres, and Ghiyasuddin Balban and later governors held the frontier from them.
The Mongol pressure shaped the province for a century. Towns were fortified, populations moved, and the north western districts were repeatedly devastated in a way the record barely covers.