Khwarazmian dynasty
While the power struggle ensued among Qabacha and Iltuthmish, Uch came under further pressure from the Khwarazmian dynasty based in Samarkand that had been displaced by the Mongol armies of Genghis Khan. Following the defeat of his father by the Mongols in the mid 1210s, the last Khwarazmian Sultan, Jalal ad-Din Mingburnu, sacked and conquered Uch in 1224 after Qabacha refused to aid him in a campaign against Genghis Khan. Jalal ad-Din Mingburnu was finally defeated by Genghis Khan in 1224 in a battle at Uch, and was forced to flee to Persia. Khan attacked Multan on his return to Iran in 1224, though Sultan Qabacha was able to successfully defend that city. Despite repeated invasions, the city remained a great centre of Muslim scholarship, as evidenced by the appointment of the renowned Persian historian Minhaj-i-Siraj as chief of the city's "Firozi" madrasa.