The Tahirids were in turn replaced in Merv by the first the Saffarids, then the Samanids and later the Ghaznavids.