Saffarid dynasty
In 870, Ya'qub ibn al-Layth al-Saffar rebelled against Abbasid rule and founded the Saffarid dynasty at Sistan. He captured present Afghanistan and most of present Iran. His successor Amr ibn al-Layth, tried to capture Transoxiana from the Samanids, who were nominally vassals of Abbasids, but he was defeated and captured by Ismail Samani at Battle of Balkh in 900. He was sent to the Abbasid Caliph as a prisoner and was executed in 902. The power of Saffarids was diminished and they became vassals of the Samanids. Thus Balkh now passed to them.