Jahan Shah, recognizing the weakness of Timurid authority in Herat, invades on June 28, 1458, and takes the city.
He is unable to keep it, however, due to pressures from within his principality of Kara Koyunlu plus the increasing threat from Uzun Hasan of Aq Qoyunlu.
Obliged to negotiate the borders of his state with Abu Sa'id Mirza, he decides after negotiations to return territorial demarcations to what they had been during the reign of Shahrukh Mirza.
Thus, Khurasan, Mazandaran and Gurgan are returned to the Timurids and Abu Sa'id Mirza returns and takes Herat a second time on December 22, 1458.
While leaving the territory, however, the Turkmens had ravaged Khurasan, and when Abu Sa'id Mirza arrives to take Herat, he finds its residents frightened.
In order to ease their fears, he sends the major portion of his army back towards Bukhara.
His rival claimants to Samarkand—namely, Ala-ud-Daulah Mirza bin Baysonqor, his son Ibrahim Mirza bin Ala-ud-Daulah and Sultan Sanjar Mirza—seeing his position thus weakened, decide to form an alliance and take this opportunity to destroy Abu Sa'id once and for all.