The allies took back Hansi, Thanesar and Nagarkot and restored worship at Nagarkot, but failed to take Lahore after a long siege.
01Nagarkot restored
In 1040 the Seljuq Turks crushed the Ghaznavid army at Dandanaqan in Khorasan, and Ghazni was in disorder. Firishta, writing in the Deccan around 1606 from older Persian histories, says that in the year 435 of the Hijra the Raja of Delhi, joined by other rajas, recovered Hansi, Thanesar and their districts from the Muslim governors, then marched on Nagarkot, the Kangra fort that Mahmud had plundered in 1009, and took it after a siege. A new image was set up in the temple in place of the one carried away, and Firishta says pilgrims came to it from all over India.
02Seven months before Lahore
Encouraged, three of the rajas marched on Lahore itself and, in Firishta’s account, besieged it for seven months. The garrison held out, and when the defenders sallied in force the allies broke up and went home. The gains in the hills did not last: a Ghaznavid commander retook Nagarkot within a decade. Firishta’s ‘Raja of Delhi’ is probably a Tomara king, but the source is late and does not name him, and no inscription confirms the campaign. It stands as the first recorded attempt by Hindu kings acting together to roll back Ghaznavid rule in the Punjab.
The campaign showed the Ghaznavid hold east of Lahore was thin once Ghazni was weak, and it put the Nagarkot temple back in Hindu hands for some years.
