Sweeping through the Punjab and Gujarat across to the western end of the Ganga valley , Mahmud of Ghazni ( 997 1030 ) used these raids more to finance his empire in Persia and Turkistan than to set up a permanent foothold in India .
Mahmud of Ghazni 's raids caused great grief , and lead to his eventual ruin .