Pir Husayn
Pir Husayn was Emir of Erzincan from 8 June 1362 until his death. Originally the ruler of Karahisar, he arrived in Erzincan on 8 June 1362 and claimed the throne that was occupied by his probable father Ahi Ayna, who died on 2–3 July. A week following Ahi Ayna's death, Pir Husayn was involved in a strife with the local emirs opposing to his rule, who were forced to flee to Bayburt and Tercan. Pir Husayn captured the former on 11 September after a 32-day siege. Although Pir Husayn was a vassal of the Eretnid dynasty and struck coins for the Eretnid rulers, he most likely exercised further autonomy than his predecessor had. There are no further surviving details on his rule from that point until his death. Pir Husayn presumably restored peace with local dignitaries he clashed with, such as Sharaf al-Din Sati, who were involved in manuscript production. Several manuscripts and copies of the works of famous poets, such as Rumi, are attributed to Pir Husayn's patronage.
Background
Following the retreat of the Byzantine Empire from much of Anatolia after the Battle of Manzikert, the area around Erzincan came under the rule of several Islamic states and dynasties such as the Mengüjekids in the early 12th century and later the Sultanate of Rum, which saw its height from the late 12th century to 1237. The Mongol invasion gradually reached the region, with the Sultan of Rum, Kaykhusraw II suffering a major defeat by the Mongol Empire at the Battle of Köse Dağ in 1243. With the division of the Mongol Empire, the Ilkhanate, founded by Hulegu Khan, rose in West Asia. At an unknown date in the first half of the 14th century, Erzincan came under the rule of Eretna, a former Ilkhanid officer who carved up his sultanate after the downfall of the Ilkhanate.Ahi Ayna Beg, an who purchased the rule of Erzincan sometime before 1348, established himself as a vassal of the Eretnid sultans. He conducted repeated military expeditions against the Empire of Trebizond and the Kingdom of Georgia, briefly extending Erzincan's influence across the Upper Euphrates and into Lazica.
Reign
Pir Husayn was originally the ruler of Koghoniya, described as "young" in a by a local manuscript producer. He arrived in Erzincan on 8 June 1362 and succeeded Ahi Ayna, who died on 2–3 July 1362 reportedly as a . In Abu Bakr Qutbi's, Pir Husayn is mentioned as an emir-zada directly following the statement about Ahi Ayna's demise, hinting at the possibility he was Ahi Ayna's son.His ascendance to the throne was not straightforward as Erzincan was in the midst of a civil war. He "gained independence" on 10 July, having clashed with emirs opposing to his rule, such as Sharaf al-Din Sati, who eventually fled to Bayburt and Tercan. On 11 September, Pir Husayn gained control of Bayburt after a 32-day siege.
Although there is a coin specimen minted in Erzincan for the Eretnid sultan Ala al-Din Ali dating back to 1366, Pir Husayn most likely exercised further autonomy under the overlordship of the Eretnids, especially following the temporary political vacuum caused by Ghiyath al-Din Muhammad I's death in 1365. Pir Husayn was loyal to the Eretnid vizier Kadi Burhan al-Din, who would later usurp the rule. However, there aren't any sufficient accounts of the period until Pir Husayn's death in 1379. There are no known hostilities between Pir Husayn and Trebizond.
Following Pir Husayn's death, Kadi Burhan al-Din and Kilij Arslan tried to conquer Erzincan. Although the local population was sympathetic towards the new administration, this offensive failed. Pir Husayn was succeeded by Mutahharten, who was the nephew of Eretna.