 It was during this period that Lahore assumed considerable importance apart from being the second capital, and later the only capital, of the Ghaznavid Empire.At the end of his reign, Mahmud's empire extended from Kurdistan in the west to Samarkand in the Northeast, and from the Caspian Sea to the Punjab in the west.Although his raids carried his forces across Northern and Western India, only Punjab came under his permanent rule; Kashmir, the Doab, Rajasthan, and Gujarat remained nominal under the control of the local Indian dynasties.