The Tahirid dynasty (Persian: سلسله‏ی طاهریان‎) was a dynasty, of Persian dihqan origin, that governed the Abbasid province of Khorasan from 821 to 873, and the city of Baghdad from 820 until 891. The dynasty was founded by Tahir ibn Husayn, a leading general in the service of the Abbasid caliph al-Ma''mun. Their capital in Khorasan was initially located at Merv, but later moved to Nishapur. The Tahirids enjoyed a high degree of autonomy in their governance of Khorasan, although they remained subject to the Abbasid caliphate and were not independent rulers.