Sufi Khalil Beg Mawsilu

Sufi Khalil Beg Mawsilu (died 1491) was a Turkoman military officer from the Mawsillu clan, who served the Aq Qoyunlu. He was one of the leading figures during the reign of Sultan Ya'qub Beg ((r. 1478 – 1490)), and played a pivotal role in the succession struggle that took place after the latter's death. He put Ya'qub's eldest son Baysunghur (who was then nine-years-old) on the throne, ruling as the virtual ruler of the realm until he was defeated and killed by his rival, Sulayman Beg Bijan.

Under Uzun Hasan and Ya'qub Beg
A member of the Mawsillu clan, Sufi Khalil was the son of a certain Begtash, and had a total of eight siblings, the most prominent ones being his brothers Amir Beg I and Bakr Beg. Sufi Khalil first appears in records in 1468. In 1480, Qaitbay, the Mamluk sultan of Egypt, sent an army under his Pecheneg commander Yashbak al-Zahiri to invade Diyar Bakr. The Aq Qoyunlu sultan Ya'qub Beg ((r. 1478 – 1490)) consequently sent an army under Bayindir Beg, Sulayman Beg Bijan and Sufi Khalil to counter the army. The two forces clashed near Ruha, in November of the same year, which resulted in a Aq Qoyunlu triumph and capture of Yashbak al-Zahiri, who was executed a few days later. The following year (1481), a force led by Sufi Khalil, Sulayman Beg Bijan, and Timur Usman Beg Miranshahi defeated and killed the rebel Bayandur.

It was following this event that Sufi Khalil became a prominent figure under Ya'qub, and was soon appointed the tutor of the latter's eldest son Baysunghur, as well as given the governorship of the southern Iranian province of Fars. At the start of 1489, Sufi Khalil led an army which recaptured the Georgian capital of Tiflis. During this period, Sufi Khalil and Sulayman Beg were occupied with extensive military operations, which gave the powerful Persian chief magistrate and tutor of Ya'qub, Qazi Isa Savaji, the opportunity to expand his power, thus gaining control over the civilian departments of the central administration, as well the government posts of military chancellor and recorder of documents. He used this newfound power to initiate a series of reforms to reorganize the realm to resemble more of a Irano-Islamic statecraft structure and thus strengthen the bureaucracy.

Under Baysunghur
At the time of the death of Ya'qub in 1490, Sufi Khalil found himself in a favourable position as the head of the political and military preponderance in the winter quarters of Qarabagh. Supported by his Mawsillu kinsmen, he persuaded the Bayandur and Miranshahi princes to install Ya'qub's nine-year-old son, Baysunghur, on the throne. Now de facto ruler of the realm, Sufi Khalil had Ya'qub's chief of staff, Mirza Ali ibn Sultan-Khalil, captured and executed. This action alienated the Bayandur and Miranshahi, which led them to revolt against Baysunghur and Sufi Khalil. A bloody battle subsequently ensured in the royal camp, which led to the elimination of the Bayandur princes and officers, including Ya'qub's brother Masih Mirza. Ya'qub's nephew Rustam Beg Bayandur was captured and imprisoned in the Alinjaq castle near the city of Nakhjavan, while Mahmud ibn Ughurlu Muhammad managed to escape to the province of Arabian Iraq, which was under Purnak control. In order to further consolidate his rule, Sufi Khalil now went against the rest of the administration of Ya'qub, including Qazi Isa, who had played a key-role in sending Sufi Khalil to the Georgian frontline, and whose reforms hurt the economic support that the Turkoman military leaders enjoyed.

Sufi Khalil accused Qazi Isa of heresy, which the latter denied. Nevertheless, a few days later (on 24 January 1491), Sufi Khalil had Qazi Isa executed by hanging in the ordu-bazar ("soldiers market"). Qazi Isa's brother Shaykh Ali Savaji, who was enforcing his brothers reforms in Fars, was arrested, tortured and fined in Shiraz by its military governor, Mansur Beg Purnak. He was subsequently moved to the capital of Tabriz, where Sufi Khalil had him executed. Qazi Isa's nephew Najm al-Din Mas'ud Savaji managed to escape for a short while, until he was poisoned by Mulla Jan at the instigation of Sufi Khalil. Najm al-Din Mas'ud's father, Mahmud Jan Daylami, escaped the fate of his associates by fleeing to the city of Qazvin. A new administration was then established with Shaykh Muhammad of the Kujuji family as its leading figure. Sufi Khalil had now rid himself of his most potent enemies, conquered all of Azerbaijan, and gained fealty of his brother Bakr Beg, who was at the Khurasan frontier in the east, and his nephew Gulabi Beg who was in Armenia in the west.

However, resistance against Sufi Khalil continued. In the city of Hamadan, Shah-Ali Beg Purnak, who had served as the governor of Arabian Iraq for a long time under Ya'qub, declared the Aq Qoyunlu prince Mahmud ibn Ughurlu Muhammad as sultan. Mahmud then sent a letter to Tabriz, evoking the accomplishments of his father: "Hasan-Ali Qara Qoyunlu was killed and Iraq conquered by my father's sword. I am his son and Sufi Khalil should recognize my rights. Both sides will be best served if Diyar Bakr and Azerbaijan are taken by Baysunghur while I retain Iraq and Fars." Sufi Khalil was against this suggestion, and declared war against Mahmud. A battle soon took place near the town of Darguzin, where the forces of Mahmud and Shah-Ali Beg Purnak were routed, with the latter getting killed, while Mahmud was captured and executed. Mansur Beg Purnak had initially backed his kinsman Shah-Ali Beg Purnak against Sufi Khalil and Baysunghur, but had now reconciled with them. He later quelled a revolt of Qayitmas Bayandur (a cousin of Ya'qub) in the city of Yazd, whose head was sent to Tabriz. Following this, Sufi Khalil's authority extended over Arabian Iraq, Persian Iraq, and Fars.

Sufi Khalil was also opposed by Sulayman Beg Bijan in Diyar Bakr, a long-time rival of his, who was the guardian, father-in-law, and former chief of staff of Ya'qub. In the early spring of 1491, Sulayman Beg defeated Gulabi Beg, and in mid-summer, he approached Sufi Khalil. After a prolonged skirmish, Sufi Khalil and his men withdrew to Tabriz, but were vanquished en route by Sulayman Beg's forces 29 July 1491, resulting in the death of Sufi Khalil and his brother Bakr Beg. Suleyman Beg kept Baysunghur in power, taking Sufi Khalil's place as the real leader of the realm. By 1507, many of the Mawsilu, including Gulabi Beg's son Amir Beg II, had sworn fealty to the emerging Safavid dynasty of Iran, established by Shah Ismail I ((r. 1501 – 1524)).