The Siege of Lahore (1043) was a military engagement during the decline of the Ghaznavid Empire. A coalition of Indian kingdoms, including Paramara Raja Bhoja, Tomara Raja of Delhi, and the Kalachuri dynasty of Tripuri, besieged the city of Lahore in an effort to expel the Ghaznavids from Punjab. Despite intense fighting and a seven-month siege, the defenders of Lahore launched a successful counterattack, forcing the besieging forces to retreat. Though the siege ended in failure for the invaders, they retained control over several captured territories, including Nagarkot and Hansi.
In 1036, Mas'ud () appointed his son Majdud to be the commander of chief of the Ghaznavid troops in India deposing Ahmad Inaltigin. Majdud occupied the territories in the Indus valley and its tributaries as far east as Hansi and Thanesar. After Mas'ud's death Majdud revolted in Lahore and Multan against Muhammad () and Mawdud (). Mawdud dispatched Salar Ahmad b. Muhammad and Faqih Saliti nominated as governor of Lahore to suppress Majdud's revolt. Majdud died on 11 August 1041, three days after declaring revolt. Mawdud thereby was able to establish his authority over Ghaznavid India.
The Indian kingdoms taking opportunity of Mas'ud's end launched attack on the Ghaznavids. In 1043-4, Paramara Raja Bhoja, Anahilla, Lakshmikarna of the Kalachuris of Tripuri formed an coalition under the leadership of Tomara Raja of Delhi to end Ghaznavid rule over Punjab. They first captured Hansi, Thanesar, Nagarkot and other dependencies of the Ghaznavids and at last besieged Lahore. Following the capture of Nagarkot, the invading forces proceeded to Lahore with 10,000 calvary and numerous body of foot, besieged the city for seven months. The siege of the city was initiated, and its walls were quickly reduced to ruins. However, garrison within staunchly defended the town, engaging in fierce street-by-street combat. For seven months, the allied forces' attempts to capture the city were in vain. With no relief arriving and the garrison suffering from severe famine, the defenders, in a final act of resolve, decided to launch a bold sortie from the fort and attacked the besieging army. Caught off guard, the invaders were routed and fled the battlefield.
The Indian chiefs retained their hold over Nagarkot, Hansi and other conquered places for some time.