Passage: He first appears circa 1283 as a pretender to the Seljuq throne. He was recognized by the Turkmen Karamanids, but he was defeated by vizier Fakhr al-Din Ali and Kaykhusraw III and sought refuge in Cilician Armenia. Nothing is known of his movements again until 1298, when he was appointed to the sultanate by the Ilkhan Mahmud Ghazan upon the downfall of Masud II. He purged the Seljuq administration of his predecessor’s men with extreme violence and became deeply unpopular; as a result when he visited the Ilkhan in 1302, he was executed and replaced with his predecessor Mesud II in order to keep the peace.

Question: Who appointed someone else to a position?
Ilkhan Mahmud Ghazan