From 1000 to 1027 the sultan Mahmud of the Ghaznavid dynasty of Afghanistan (971-1030) led about seventeen expeditions into northern India — under the banner of holy war for wealth and land, and for the vast temple treasuries. He broke the Hindu Shahi of Punjab and the coalitions of the Rajputs in turn, and raided Kanauj, Multan and Thanesar; in the winter of 1025-1026 he crossed the Thar to fall upon the great Shiva temple of Somnath in Kathiawar — the golden gates melted and treasure, by legend, of three million dinars carried off, and all India shook. The raids fixed a century of Muslim rule over Punjab (Lahore a great emporium of Islamic culture moving east) and set the conquest's paradigm — cavalry raid plus temple plunder — which successors and the Ghorids, founders of the Delhi Sultanate, followed: from 1175 the Ghor armies pushed deep into the Ganges plain and finally made Delhi their seat. Mahmud himself was famous as a patron of learning, gathering Al-Biruni and Ferdowsi to his court; India reckoned him the beginning of the foreign scourge — temple defense hardened and the Rajput martial tradition strengthened, and the balance of the subcontinent's north and south was rewritten from his time.