Mu'izz al-Din better known as Shahāb-ud-Din Muhammad Ghori was a conqueror from the region of Ghor in modern Afghanistan. Before 1160, the Ghaznavid Empire covered an area running from central Iran east to the Punjab, with capitals at Ghazni on the banks of Ghazni river in present-day Afghanistan, and at Lahore in present-day Pakistan. In 1160, the Ghurids conquered Ghazni from the Ghaznavids, and in 1173 Muhammad Bin Sām was made governor of Ghazni. In 1186 and 1187 he conquered Lahore in alliance with a local Hindu ruler, ending the Ghaznavid empire and bringing the last of Ghaznavid territory under his control, and seemed to be the first Muslim ruler seriously interested in expanding his domain in the sub-continent, and like his predecessor Mahmud initially started off against the Ismaili kingdom of Multan that had regained independence during the Nizari conflicts, and then onto booty and power.