The Ak Koyunlu Turkomans first acquired land in 1402, when Timur granted them all of Diyar Bakr in present-day Turkey. For a long time, the Ak Koyunlu were unable to expand their territory, as the rival Kara Koyunlu or "Black Sheep Turkomans" kept them at bay. However, this changed with the rule of Uzun Hassan, who defeated the Black Sheep Turkoman leader Jahān Shāh in 1467.

After the defeat of an Timurid leader, Abu Sa'id, Uzun Hassan 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 Ak Koyunlu into an alliance with the Karamanids of central Anatolia.

As early as 1464, Uzun Hassan had requested military aid from one of the Ottoman Empire's strongest enemies, Venice, however, despite Venetian promises, this aid never arrived, and as a result, Uzun Hassan was defeated by the Ottomans at the Battle of Otlukbeli in 1473, though this did not destroy the Ak Koyunlu.

When Uzun Hassan died early in 1478, he was succeeded by his son Khalil Mirza (Sultan Khalil), but the latter was defeated by a confederation under his younger brother Ya'qub at the Battle of Khoy in July.[8]

Ya'qub, who reigned from 1478 to 1490, sustained the dynasty for a while longer. However, during the first four years of his reign there were seven pretenders to the throne who had to be put down.[9] Following Ya'qub's death, civil war again erupted, the Ak Koyunlus destroyed themselves from within, and they ceased to be a threat to their neighbors.

The Safavids, who were Shi'i Muslims, began to undermine the allegiance of many Ak Koyunlu. The Safavids and the Ak Koyunlu met in battle at Nakhchivan in 1501, and the Safavid leader Ismail I forced the Ak Koyunlu to withdraw.

In his retreat from the Safavids, the Ak Koyunlu leader Alwand destroyed an autonomous splinter Ak Koyunlu state in Mardin. The last Ak Koyunlu leader, Murad, brother of Alwand, was also defeated by the same Safavid leader. Though Murād briefly established himself in Baghdad in 1501, he soon withdrew back to Diyar Bakr, signaling the end of the Ak Koyunlu rule.

The leaders of Ak Koyunlu were from the Begundur or Bayandur Oghuz clan[10] and were considered descendants of the semi-mythical founding father of the Oghuz, Oghuz Khan.[11] The Bayandurs behaved like statesmen rather than warlords and gained the support of the merchant and feudal classes of South Caucasus (present day Azerbaijan).[11]

With the conquest of Iran, not only did the Ak Koyunlu center of power shift eastward, but Iranian influences were soon brought to bear on their method of government and their culture.[12] In the Iranian provinces Uzun Hassan maintained the preexisting administrative system along with its officials, whose families had in some cases served under different dynasties for several generations.[13] There were only four top civil posts, all held by Iranians, in Uzun Hassan's time: those of the vizier, who headed the great council (divan); the mostawfi al-mamalek, who was in charge of the financial administration; the mohrdar, who affixed the state seal; and the marakur "stable master", who looked after the royal court.[12]

In letters from the Ottoman Sultans, when addressing the kings of Ak Koyunlu, such titles as Arabic: ملك الملوك الأيرانية‎ "King of Iranian Kings", Arabic: سلطان السلاطين الإيرانية‎ "Sultan of Iranian Sultans", Persian: شاهنشاه ایران خدیو عجم‎ Shāhanshāh-e Irān Khadiv-e Ajam "Shahanshah of Iran and Ruler of Persia", Jamshid shawkat va Fereydun rāyat va Dārā derāyat "Powerful like Jamshid, flag of Fereydun and wise like Darius" have been used.[14] Uzun Hassan also held the title Padishah-i Irān "Padishah of Iran",[15] which was re-adopted again in the Safavid times through his distaff grandson Ismail I, the founder of the Safavid dynasty.

Amidst the struggle for power between Uzun Hassan's grandsons Baysungur (son of Yaqub) and Rustam (son of Maqsud), their cousin Ahmed Bey appeared on the stage. Ahmed Bey was the son of Uzun Hassan's eldest son Uğurlu Muhammad, who, in 1475, escaped to Ottoman Turkey. Ottoman SultanMehmed II received Uğurlu Muhammad with kindness and gave him his daughter, of whom Ahmed Bey was born.[16]

According to Hasan Rumlu's Ahsan al-tavarikh, in 1496-7 a certain Hasan Ali Tarkhani went to Ottoman Turkey to tell Sultan Beyazid II that Azerbaijan and Persian Iraq were defenceless and suggested that Ahmed Bey, heir to that kingdom, should be sent there with Ottoman troops. Beyazid agreed to this idea, and by May 1497 Ahmad Bey faced Rustam near Araxes and defeated him.[16]

^H.R. Roemer, "The Safavid Period", in Cambridge History of Iran, Vol. VI, Cambridge University Press 1986, p. 339: "Further evidence of a desire to follow in the line of Turkmen rulers is Ismail's assumption of the title 'Padishah-i-Iran', previously held by Uzun Hasan."

^ abVladimir Minorsky. "The Aq-qoyunlu and Land Reforms (Turkmenica, 11)", Bulletin of the School of Oriental and African Studies, University of London, 17/3 (1955): 458.