Mahmud of Ghazni was the first Sultan of the Ghaznavid Empire, ruling from 998 to 1030.