Of these Ahmad and his second son Isma`il overthrew the Saffarids (q.v.) and the Zaidites of Tabaristan; and thus the Samanids established themselves with the sanction of the caliph Motamid in their capital Bokhara.
On his return to Khorasan he set on foot a series of new expeditions against Jorjan and Tabaristan, with only partial success.
The greater part of his troops were in Rei with his son al-Mandi, who had conquered Tabaristan, in Africa, with Mahommed b.
Harlan confirmed him in his post, and, after having received the chiefs of Tabaristan who came to tender their submission, returned through Bagdad to Rakka on the Euphrates, which city was his habitual residence.
I.) Motasim had just returned to Samarra when a serious revolt broke out in Tabaristan, Maziyar, one of the hereditary chiefs of that country, refusing to acknowledge the authority ofAbdallah Ibn Tahir, the governor of Khorasan, of which Tabaristan was a province.
Zaid, gained possession of Tabaristan and occupied the great city of Rai (Rey) near Teheran.
But he returned soon, and after many reverses ruled over Tabaristan and Jorjan for many years.
Only in tho secluded districts of northern Media (Tabaristan), the generals of the house of Karen (Spahpat, Ispehbed) maintained themselves for a century as vassals of the caliphs exactly as Atropates and his dynasty had done before them.
In the reign of the caliph Motasim a serious revolt of Persian Mazdakite sectaries (the Khorrami) in alliance with Byzantium was with difficulty suppressed, as also a rising of Tabaristan under an hereditary chief Maziyar who was secretly supported by the Turkish mercenaries (e.g., Af shin) whom the caliph had invited to his court.
Azerbaijan, while in Tabaristan an Alid dynasty (the Zaidites) was independent from 864 to 928, when it fell before the Samanids.
In 1037 Seljuk princes were recognized in Merv and Nishapur, and in the ensuing eighteen years the Seljuks conquered Balkh, Jorjan, Tabaristan, Klwarizm, Hamadan, Rai, Isfahan, and finally Bagdad (1055).