linguistic:translation, stylistic:style_transfer, linguistic:voice_change
Mongol conquest

Kaykhusraw II (1237–1246) began his reign by capturing the region around Diyarbakır, but in 1239 he had to face an uprising led by a popular preacher named Baba Ishak. After three years, when he had finally quelled the revolt, the Crimean foothold was lost and the state and the sultanate's army had weakened. It is in these conditions that he had to face a far more dangerous threat, that of the expanding Mongols. The forces of the Mongol Empire took Erzurum in 1242 and in 1243, the sultan was crushed by Baiju in the Battle of Köse Dağ (a mountain between the cities of Sivas and Erzincan), resulting in the Seljuk Turks being forced to swear allegiance to the Mongols and became their vassals. The sultan himself had fled to Antalya after the battle, where he died in 1246; his death started a period of tripartite, and then dual, rule that lasted until 1260.

The Seljuk realm was divided among Kaykhusraw's three sons. The eldest, Kaykaus II (1246–1260), assumed the rule in the area west of the river Kızılırmak. His younger brothers, Kilij Arslan IV (1248–1265) and Kayqubad II (1249–1257), were set to rule the regions east of the river under Mongol administration. In October 1256, Bayju defeated Kaykaus II near Aksaray and all of Anatolia became officially subject to Möngke Khan. In 1260 Kaykaus II fled from Konya to Crimea where he died in 1279. Kilij Arslan IV was executed in 1265, and Kaykhusraw III (1265–1284) became the nominal ruler of all of Anatolia, with the tangible power exercised either by the Mongols or the sultan's influential regents.

The Seljuk state had started to split into small emirates (beyliks) that increasingly distanced themselves from both Mongol and Seljuk control. In 1277, responding to a call from Anatolia, the Mamluk Sultan Baibars raided Anatolia and defeated the Mongols at the Battle of Elbistan, temporarily replacing them as the administrator of the Seljuk realm. But since the native forces who had called him to Anatolia did not manifest themselves for the defense of the land, he had to return to his home base in Egypt, and the Mongol administration was re-assumed, officially and severely. Also, the Armenian Kingdom of Cilicia captured the Mediterranean coast from Selinos to Seleucia, as well as the cities of Marash and Behisni, from the Seljuk in the 1240s.

Near the end of his reign, Kaykhusraw III could claim direct sovereignty only over lands around Konya. Some of the beyliks (including the early Ottoman state) and Seljuk governors of Anatolia continued to recognize, albeit nominally, the supremacy of the sultan in Konya, delivering the khutbah in the name of the sultans in Konya in recognition of their sovereignty, and the sultans continued to call themselves Fahreddin, the Pride of Islam. When Kaykhusraw III was executed in 1284, the Seljuk dynasty suffered another blow from internal struggles which lasted until 1303 when the son of Kaykaus II, Mesud II, established himself as sultan in Kayseri. He was murdered in 1308 and his son Mesud III soon afterwards. A distant relative to the Seljuk dynasty momentarily installed himself as emir of Konya, but he was defeated and his lands conquered by the Karamanids in 1328. The sultanate's monetary sphere of influence lasted slightly longer and coins of Seljuk mint, generally considered to be of reliable value, continued to be used throughout the 14th century, once again, including by the Ottomans.