Even after the victory of Ismail, in the eyes of the caliph Nasr was still the legal ruler of Transoxiana rather than his brother Ismail, and this legality Ismail recognized until the death of Nasr in Jumada I 279/August 892. Meanwhile, Ya'qub b. Laith had also died and was followed by his brother 'Amr, who considered himself the heir of the Tahirids, hence dejure ruler of Transoxiana, as well as Khurasan and other parts of Iran. 'Amr persuaded the caliph to send him the investiture for Transoxiana, and this was done possibly with the hope that the Saffarids and Samanids would destroy each other. Ismail was victorious, and if the stories about 'Amr's defeat are to be believed, he was captured by Ismail's troops near Balkh without a skirmish. In any case 'Amr was captured and sent as a prisoner to Baghdad where the caliph ordered his execution. The date of the victory of Ismail over 'Amr is uncertain, but probably it was in the spring of 287/900. The victory over 'Amr brought recognition to Ismail from the caliph as ruler over all of Khurasan. This formal recognition, in the form of documents, presents, and a robe of honour, meant only a recognition of the actual situation, since the power of the caliphate had long since ceased to extend to the east. Isma'il was the real founder of the Samanid state, and is highly regarded in all sources for his good qualities as a ruler, indeed almost an idealized ruler. Isma'il enlarged the Samanid domain in all directions. In 280/893 he raided to the north and captured the city of Taraz where a Nestorian church was reputedly turned into a mosque and much booty was taken. This expedition is reported differently by various sources, but they all agree in the success of Isma'il. This campaign and another by Ismail in 291/903, although it did not result in a great extension of the Samanid frontiers to the north and east, at least made that frontier safe from raids of Turkish infidels, and enabled Muslim missionaries to propagate Islam into the steppes. We may surmise, if we study the extant coinage, that Isma'il ended the independent existence of a number of small vassal states in Central Asia, placing them directly under Samanid rule. Probably in 280/893 he ended the local dynasty of Ushrusana in the upper Zarafshan valley, famous as the homeland of the ill-fated Afshin Haidar b. Kaus. It is not known when the various parts of Transoxiana submitted to the Samanids, but some of them remained under the control of their local rulers, for example in Khwarazm where the country became a part of the Samanid state after Isma'il's defeat of 'Amr b. Laith, but the local Khwarazmian dynasty continued to flourish until 385/995 in the south of the country, while a governor of the Samanids ruled in the north with his capital at Gurganj. In 385/995 the northern ruler defeated the southern and annexed his domains, but throughout the existence of the Samanid state both parts of Khwarazm remained true vassals of the Samanids. So Ismail's domains were composed both of provinces of the central government and of vassal princes.