But the Samanids, too, had mamluks, and one of their mamluk generals decided he would rather give orders than take them. Goodbye, Samanids; hello, Ghaznavids. The new rulers were called Ghaznavids because they moved their capital to the city of Ghazni, southeast of Kabul. The Ghaznavid dynasty peaked with a long-lived conqueror named Mahmud, a Charlemagne of the Islamic East.