 After the defeat of a Timurid leader, Abu Sa'id Mirza, Uzun Hasan was able to take Baghdad along with territories around the Persian Gulf.He expanded into Iran as far east as Khorasan.However, around this time, the Ottoman Empire sought to expand eastwards, a serious threat that forced the Aq Qoyunlu into an alliance with the Karamanids of central Anatolia.