 With his help, a truce was achieved between Husayn and Khalaf in 983.Husayn received Zarang and much of Sistan; he entered the capital and had the name of the Samanid amir inserted in the khutba there.Khalaf left Zarang and took up residence in the nearby fortress of Taq and was to receive the revenues of the state lands and part of the revenues from Zarang.