[6] Hasan ruled between 1452 and 1478, and would preside over the confederation's territorial apex when it included parts or all of present-day Iraq, Turkey, Azerbaijan, Iran, Transcaucasia and Syria.
Timur, the founder and ruler of the Timurid Empire, had appointed Uzun Hasan's grandfather, Kara Yülük Osman, as a governor of Diyarbakır, with the cities of Erzincan, Mardin, Ruha (or Urfa), and Sivas.
Later, Persia was divided between two Timurid rulers, Jahan Shah of Qara Qoyunlu (the Black Sheep Turkoman) and Uzun Hasan.
After twenty years of fighting, Uzun Hasan eventually defeated Jahan Shah in a battle near the sanjak of Çapakçur[7][8] in present-day eastern Turkey on October 30[9] (or November 11[10]), 1467.
Uzun Hasan then ambushed and captured Abu Sa'id at the Battle of Qarabagh, whereupon he was executed by Yadgar Muhammad Mirza, a rival.
[22] According to Contarini, ambassador to Uzun Hasan's court from 1473 to 1476, "The king is of a good size, with a thin visage and agreeable countenance, and seemed to be about seventy years old.
Contarini also wrote, "The empire of Uzun-Hassan is very extensive and is bounded by Turkey and Caramania, belonging to the Sultan, and which latter country extends to Aleppo.
By one of his wives, he had a son named Masubech, or Maksud beg, whom he kept in prison because he was detected corresponding with his rebellious brother Ogurlu, and whom he afterward put to death.
It has been reported by some who were present, that at one time he led an army of 40,000 Persians to battle against the Turks, for the purpose of restoring Pirameth to the sovereignty of Karamania, whence he had been expelled by the infidels.
[31] This transformation campaign commenced after his conquests of northwestern and central Iran, where he, as a byproduct, displaced the waning authority of the Timurids.
Some documents related to the western territories of the Aq Qoyunlu state, which became part of the Ottoman Empire (Diyarbakir, Mardin, Urfa, etc.)
After the conquest of eastern Anatolia in 1517–18, and of Iraq in 1537, the Ottomans preserved the laws of Uzun Hasan (Qānūn-nāma-ye Ḥasan Pādšāh).