 During Tahir's early life, he served as the governor of Marw during the reign of his grandfather Amr ibn al-Layth.In 900, Amr ibn al-Layth, was captured by the Samanids while campaigning against them in Khurasan.The Saffarid army swore loyalty to Tahir, who soon afterwards effectively made his brother Abu Yusuf Ya'qub his co-ruler, although the "khutba" continued to be made in 'Amr's name until late 901.