Ghiyath al-Din Ahi Ayna Beg (Armenian: Yaxiayna Bēk; Medieval Greek: Αχχὴς Ἀϊναπάκ; Persian: اخـی ایـنبـك; died 2–3 July 1362) was Emir of Erzincan from 1348 until his death.
Thought to be a local ahi (guild member), he gained control of the region and the city of Erzincan in northeastern Anatolia through a purchase from his unknown predecessor sometime before 1348.
[3] At an unknown date in the first half of the 14th century, Erzincan came under the rule of Eretna (r. 1343–52), a former Ilkhanid officer who carved up his sultanate after the downfall of the Ilkhanate.
After his victory in 1343 at Karanbük (between Erzincan and Sivas) against the Chobanid army led by Suleiman Khan, Eretna declared independence as the sultan of his domains, minting his own coins and having the khutbah (sermon) delivered in his name.
[4] The contemporary Trapezuntine historian Michael Panaretos wrote that in June 1348, Ahi Ayna led a joint attack against the Empire of Trebizond together with Tur Ali Beg of the Aq Qoyunlu Turkmens and Muhammad Rikabdar, the emir of Bayburt.
He captured Akhaltsikhe, Samstskhe, and Atsquri, took 12,000 people captive, and had Manglisi pay jizya (special tax on non-Muslims).
[13] Pir Husayn, who was originally the ruler of Karahisar, arrived in Erzincan on 8 June 1362 and succeeded Ahi Ayna Beg.