position, Ahmad requested the assistance of the Kara Koyunlu. Shaikh 'Ali fell in battle against the Kara Koyunlu. In the spring of 1384, the Chagatai amir Timur attacked the Jalayirids and Azerbaijan. Although Sultan Ahmad was not captured, his subordinates in Soltaniyeh failed to defend the town and Timur took it with a minimum of resistance. In the midst of Timur's absence, Sultan Ahmad had to deal with an invasion by Tokhtamysh, Khan of the Golden Horde in 1385. Timur completed his Indian campaign and returned to Azerbaijan in 1396. Kara Koyunlu ruler Kara Yusuf, who retreated to Mosul to avoid a sudden raid, was able to take shelter in the Ottomans in 1400. The hosting of Yildirim Bayezid to Kara Yusuf was one of the main reasons Timur launched a campaign against the Ottomans. He was able to reach Damascus by escaping into the desert. Kara Yusuf was welcomed by Sheikh Mahmud, the nâib of Damascus. Not long after, Jalairid Sultan Ahmed also came to Damascus. Not wanting to worsen relations with Amir Teymur, Nasir-ad-Din Faraj agreed to capture Gara Yusif and Sultan Ahmed Jalairi, and hand them over to Teymur. Sultan Ahmed Jalayir and Kara Yusuf imprisoned on the order of Nasir-ad-Din Faraj. Together in prison, the two leaders renewed their friendship, making an agreement that Sultan Ahmed Jalayir should keep Baghdad while Qara Yusuf would have Azerbaijan. Ahmad also adopted his son Pirbudag. When Timur died in 1405 Nasir-ad-Din Faraj released them both. However, according to Faruk Sümer, they were released on the orders of rebellious wali of Damascus - Sheykh Mahmud. In 1409 fall, Qara Yusuf entered Tabriz and sent a raiding party to Shirvan, especially Shaki, which was fruitless. Kara Koyunlu defeated Jalayirds in 1432, bringing an end to the dynasty. Government The Jalayirid administration was modeled after Ilkhanate protocols, with documents in Persian and Mongolian. Its diplomatic correspondence also resembled the Ilkhanate's, using a red ink square seal with Islamic phrases in Arabic. Rulers Family tree See also Chupanids Mongol invasions of Azerbaijan References Sources 1432 disestablishments in Asia States and territories established in 1335 Mongol states 1335 establishments in Asia 1330s in the Middle East