Choresm (Chaos)

Start as OTL and divergence
In 1200, the Shah Ala ad-Din died and was succeeded by his son, Ala ad-Din. 1212, the latter defeated the Gur-Khan Kutluk and conquered the lands of the, to whom the Choresmians once had had to pay tribute. 1217/18, he planned to attack the Caliphate of, but too many of his soldiers died on the way in a blizzard in the mountains, so he had to postpone the attack. The attacks of the Mongols 1219-25 didn't happen ITTL of course, but in 1222, Shah Muhammad still died, so he was succeeded by his son Jalal-ad-Din. (OOC: There's not too much known about him; IOTL, he managed to save himself by jumping from a dangerously high place into a river after having lost against the Mongols; even Genghis is said to have been impressed by his courage, so I'm giving him the benefit of doubt and make him a courageous warrior ITTL.) Jalal-ad-Din reigned a great empire, consisting of OTL today's Iran and all the -stans; however, this also meant he had to care for various groups trying to rebel against him. Being a good warrior, he eventually succeeded and kept the empire together, which was achieved in 1230. Of course, the Choresmians never had to fight as mercenaries after the Mongol defeat, so they wouldn't plunder in 1225/26, or confuse the Middle East in the 1230s.

1233, Jalal-ad-Din demanded formal recognition from the caliph in Baghdad. When the caliph rejected his claim, the Shah proclaimed one of his nobles caliph and marched towards Baghdad to depose the caliph. In 1236, the Choresmians took Baghdad and toppled the old Abbasid caliph. Al-Mustansir was imprisoned, but some of his relatives fled to and the lands of the. This victory was consolidated 1239, when the Shah married his daughter Khadiya to his puppet Caliph.

Some confusion happened in 1240: After a governor of the Shah had insulted the new Mongol leader by killing his diplomats, the latter decided to attack Choresm. In the battle near the city of Otrar, Ogadai and Jalal-ad-Din met each other. The attack of the Mongols was successful at first, but the courageous Shah managed to collect his men and prevents a catastrophe. The situation at other frontiers was also indecisive. Fortunately, Ogadai would die soon after (without the Shah knowing it), and Jalal-ad-Din could continue his expansion. 1246, the little countries of the Zangids were conquered by Choresm. During the 1250s, various border clashes between Choresm and the Sultanate of happened. But in 1255, Jalal-ad-Din died. Some areas of his empire (Kara-Kitai, ) tried to break away; the Kara-Kitai managed to stay independent, but Afghanistan was pacified in the following years and stayed in the fold.

Now in 1262 the Ayyubid sidelines still reigning in who feared the rising power of the Mamluks and Rum-Seljuks appealed to the new Shah  for protection. Thus, Choresm's sphere of influence now bordered the Mediterranean. A few years later, in 1268 the little of Antiochia and Tripolis (in Lebanon, not in Libya) were conquered by Syrian and Choresmian troops.

The Harunid and Karluk dynasties
In 1292, the last Anushtiginid died and was replaced by the army commander, who died the same year however, but not without founding the Harunid dynasty, which would last until 1318, when it was replaced by the Karluk dynasty, members of another Turkic tribe. The new Shah consolidated the empire and also added Kashgar to it.

Some time later, in 1334, Choresm and Mamluk Egypt clashed over Syria / Palestine. Choresm won and annexed northern Palestine, but news about unrests in Afghanistan forced the Shah to cancel further advancing. In 1352, Egypt allied with the Sultanate of Konya against Choresm. The invaded Syria together, defeated the Choresmian armies several times. When Choresm was in a desperate situation, the Shah hired the in 1357 to get rid of his enemies. The general of the Mamluks and the Sultan of Konya were killed. Choresm made peace, only had to give northern Palestine back to Egypt.

Under the weak Shah, in 1365 the ns threw off the Choresmian yoke, forming a new Shiite empire under the Zahedid dynasty (named after an old Sufi order) that included Azerbaijan and Mesopotamia. Afghanistan also became independent again. And in 1371, the Rum-Seljuks picked up the pieces in Syria where the breakdown of the Choresmian empire had left a power vacuum. In addition to the Civil War that followed on the death of the Shah in 1372, in the years 1378-85 the stroke Choresm, preventing a reconquest of Persia; and 1386-89, the leader of the   stroke against the weakened empire. After his hordes finally left, as the historians say, "not even grass grew anymore" in the ravaged north-eastern provinces.

🇨🇳