 However, once this aim was accomplished, he moved onto the richness of the loot of Indian temples and monasteries.By 1027, Mahmud had captured parts of North India and obtained formal recognition of Ghazni's sovereignty from the Abbassid Caliph, al-Qadir Billah.Ghaznavid rule in Northwestern India (modern Afghanistan and Pakistan) lasted over 175 years, from 1010 to 1187.