The Mongol state was founded by Genghis Khan (1206–27) after he succeeded in uniting the Mongol tribes in 1206. He soon began to wage war against his neighbours: the Jurchen emperors in northern China, the Tangut state in north-western China and finally the Khwarizmshahs in central Asia. In 1231 the Mongols destroyed the remnants of the state of the last Khwarizmshah to rule over Iran, Iraq and Azerbaijan, Jalal al-Din Mankburni (1220–31), and this brought them to the borders of the sultanate of Rum. Shortly afterwards, in 1231–2, Sebasteia’s hinterland came under attack from Chormaghun, commander-in-chief of theMongol army in Azerbaijan and Armenia. Kay-Qubad I immediately agreed to pay tribute to the Mongols and a Mongol embassy had arrived in Rum by early September 1236. Before any agreement could be ratified, Kay-Qubad I died on 30 May 1237, but his successor Kay-Khusraw II (1237–46) was swift to send word of his submission to the great khan O¨ gedei (1229–41): ‘I, too, commit myself to the way of agreement and obedience.’51 Kay-Khusraw II’s deeds did not match his words of compliance, and he failed to establish contact with Chormaghun, nor did he visit the court of the great khan in person. However, the situation changed once again with O¨ gedei’s death in 1241. In the following year, after a lengthy campaign in eastern Europe, Genghis Khan’s grandson Batu (1239–55) established a new state, the Golden Horde, and took command of the Mongol forces below the Caucasus range. In 1241–2 a new general, Baiju, was made commander-in-chief of the Mongol troops in Armenia, although Chormaghun nominally preserved his position, despite being struck dumb (or deaf ) in battle. Baiju immediately attacked the sultanate. Kay-Khusraw II gathered a large army and called on his allies (including the empires of Trebizond and Nicaea) for help. It was in vain: Baiju completely defeated him in the battle of K¨ose Da˘g on 26 June 1243. While Kay-Khusraw II fled westwards to the Nicaean border, his vizier Muhadhdhab al-Din, moving under his own steam, went first to Baiju and then to Chormaghun. The vizier signed an agreement obliging the sultanate to pay tribute and committing it to becoming a Mongol vassal-state. Batu confirmed these terms during the winter of 1243–4. The submission of Rum to the Mongols created new problems for John III Vatatzes: the sultanate, together with Cilician Armenia and Trebizond, now became part of the pax mongolica. In AsiaMinor, the empire of Nicaea was the only state remaining outside Mongol control, and thus it became the next likely target of the Mongol armies. To prevent this, the emperor had to maintain the sultanate of Rum as a buffer zone between the empire and the Mongols. The enmity between Batu of the Golden Horde and the great khan G¨uy¨ug (1246–8) as well as the inner struggles in the GreatMongol khanate before the enthronement of M¨ongke (1251–9) alleviated the immediate threat to the Nicaean borders. Kay-Khusraw II died in 1246; his elder son, Kay-Kawus II (1246–56, 1257–61), who enjoyedNicaean support, nominally recognised the supremacy of Batu but refused to go and pay court to the great khan in person. In order to reduce Batu’s influence, G¨uy¨ug dismissed Baiju and appointed a new general, Eljigidei. He also ordered Kilij Arslan IV to share the throne with his brother Kay-Kawus II. Although Batu managed to reinstal Baiju in 1251, the position of the Golden Horde in the Caucasus continued to deteriorate. In the same year the great khan M¨ongke made his brother Hulagu (1258–65), the future Ilkhan, ruler over Iran, Syria, Egypt, Rum, Azerbaijan and Armenia (of these, Egypt and southern Syria had yet to be conquered). Batu, who claimed part of these lands for himself, forbade Hulagu to cross the Oxus. Only after Batu’s death in 1255 did Hulagu begin his campaign against the Ismaili state of the Assassins in northern Iran and the Abbasid caliphate. Kay-Kawus II, who had imprisoned his brother Kilij Arslan IV by 1256, did not want to exchange nominal submission to the Golden Horde for stricter control at the hands of Hulagu, the future Ilkhan. Besides, Hulagu wanted the plain of Mughan for himself, and ordered Baiju to leave. In August 1256 Baiju arrived unexpectedly at Theodosioupolis (by now called Erzurum). Terrified by the prospect of permanent Mongol settlement in his realm, Kay-Kawus II refused to allow Baiju to remain in the sultanate of Rum and started preparing for war. There was not enough time for Theodore II Laskaris (1254–8) to send him support, but at this very moment Michael Palaiologos – megas konostaulos of Nicaea and future emperor – turned up inKonya.He was a refugee who appeared dangerous in Theodore II’s eyes because of his noble ancestry, which included links with both the Komnenoi and the Angeloi. It is not entirely clear whether Michael sought refuge in the sultanate simply to avoid possible arrest or whether he really was plotting for the throne of Nicaea. What is certain is that Kay-Kawus II immediately used him against theMongols;Michael headed the detachment of the Greeks of Rum, fighting under Byzantine banners. However, by 14 October 1256 Baiju had defeated the sultan at Sultanhani and Kay-Kawus fled to the empire of Nicaea; Michael Palaiologos, who escaped to Kastamonu, did the same at the beginning of 1257, when he was pardoned by Theodore II Laskaris. In this dangerous situation the Mongols were in a strong position to attack the empire of Nicaea; but Nicaean diplomacy rose to the occasion. Between January and March 1257, with Baiju’s army still at the borders, a Mongol embassy arrived in Nicaea, sent by the Ilkhan Hulagu. Theodore II gave the envoys a magnificent reception.52 Hulagu, preoccupied with his struggle against the Abbasids, agreed to restore Kay-Kawus II to the throne, on condition that he would share the sultanate with Kilij Arslan IV. By May 1257 Kay-Kawus II was back in power at Konya. It was a triumph for Nicaean diplomacy, launching a rapprochement betweenNicaea and the Ilkhans, while theNicaean alliance with the Seljuqs remained as strong as ever. Kay-Kawus II, who ruled the western part of the sultanate, even appointed one of the Nicaean military commanders, his friend Michael Palaiologos, as a beylerbey (commander-in-chief ) at the beginning of 1258.53 No doubt he did so in order to ensureNicaean military support. Yet even when united, the Nicaean and Seljuq armies were no match for the Mongols. Imperial Realpolitik increasingly required friendly relations with theMongols of Iran, and it wasMichael Palaiologos who first perceived this fact of political life. In 1261 the Mongols finally drove the rebellious Kay-Kawus II out of Rum, but Palaiologos – now Michael VIII (1258–82) – no longer supported his former friend. He detained the sultan in Constantinople; Kay-Kawus II was only liberated three years later, in the autumn or winter of 1264, through the good offices of his brother-in-law Berke (1257–66) of the Golden Horde. After its restoration in 1261, the Byzantine empire managed to preserve a balance between the GoldenHorde and the Ilkhan state. On the one hand, Michael joined the alliance which Mamluk Egypt and the Golden Horde had forged at the end of 1260, united by their mutual animosity towards the Ilkhans. On the other, he successfully negotiated a marriage treaty with the Ilkhan in 1265, marrying his own illegitimate daughter Maria to Hulagu’s successor Abaqa (1265–82). The Ilkhans’ desire to avoid having to mount a military campaign in AsiaMinor helps explain their tolerance of Byzantine neutrality in an otherwise hostile environment. Besides, both states had a common enemy: the nomadic Turks.