ruler Kelhanadeva (who was earlier deposed by from Nadol by Muhammad), the Jalor Chahamana ruler Kirtipala, and the Arbuda Paramara ruler Dharavarsha. The Ghurid army suffered heavy casualties during the battle, and also in the retreat back across the desert to Ghazni. The defeat forced Muhammad to opt for the northern routes who thenceforth, concentrated on creating a suitable base in Punjab and northwest for further incursions into northern India. Conquest of Punjab In 1179, Muhammad of Ghor conquered Peshawar which was possibly ruled by the Ghaznavids. Thereafter, he advanced further and besieged Lahore in 1181, although Khusrau Malik managed to kept him around the borders of Lahore for few more years by sending tributes along with one of the Ghaznavid prince (Malik Shah) under his custody in Ghazna as a hostage. In 1182, Muhammad subjugated the Soomra rulers of Sindh, capturing enitre region till the seashore in Debal. In the subsequent years, he expanded and consolidated his conquests around present-day Pakistan and annexed Sialkot along with sacking Lahore and the countryside. After Khusrau Malik made an unsuccessful attempt to dislodge the Ghurid garrison in Sialkot, Muhammad of Ghor made the final assault on Lahore and forced him to surrender after a short siege. He later treacherously imprisoned Khusrau Malik in the fort of Gharchistan, breaching his own agreement of safe conduct for his presence. Khusrau Malik and all his kinfolks were executed before 1192. Thus, ended the lineage of Ghaznavids and their historic struggle with the Ghurids. After uprooting the Ghaznavids, Muhammad of Ghor now established his sway over the upper Indus Plain, including most of the Punjab. He, appointed Mulla Sirajuddin who was earlier a high-ranking Qāḍi in his father court, as the head of judicature department in the newly conquered Ghaznavid territories along with the charge of Multan. His son Minhaj al-Siraj (born 1193) later composed the Tabaqat-i-Nasiri in 1260 which is regarded as a monumental work from the medieval period on the Ghurid dynasty and the Delhi Sultanate. First Battle of Tarain In 1190, after consildating in Sindh and western Punjab, the Ghurid generals began to raid the eastern Punjab region and captured a fortress, Bathinda in present-day Punjab state on the northwestern frontier of Prithviraj Chauhan's kingdom. After appointing a Qazi Zia-ud-Din of Tulak as governor of the fortress with 1200 horsemen, Muhammad received the news that Prithviraj's army, led by his vassal prince Govind