Later Turco-Mongol Invasion During the reign of Udayanadeva, the Kashmir Valley was again invaded by Mongol-Turk forces, and Udayanadeva fled to Ladakh. Kota Rani, along with Shah Mir, called upon the many disorganized Damara (warlords of Kashmir), rallying them together. This now unified resistance defeated the invading armies, prompting their retreat from the valley. Revolt Against Kota Rani In the aftermath of the conflict, Shah Mir won prestige for his role in unifying the people. Kota Rani took notice of his increasing popularity, and in an effort to check him, appointed Bhatta Bhiksana, a powerful man within the kingdom, as her Prime Minister. She also decided to move her capital to Andarkot, away from Srinagar, where Shah Mir had a great influence. This enraged Shah Mir, as he felt ignored in spite of his great labors for the kingdom. He had Bhiksana assassinated , and asked Kota Rani to marry him and share power, threatening to wage war on her if she was to refuse. She declined, and the two of them began organizing their armies. Shah Mir set out with his army from Srinagar towards Andarkot. Kota Rani sent out a force to check his advance, but it was promptly defeated. The fort at Andarkot was then laid siege to. While this was going on, many of Kota Rani's troops, seeing the futility of the situation, deserted and joined Shah Mir, to whom most important chiefs in the kingdom had already pledged allegiance. Kota Rani soon surrendered, and accepted Shah Mir's earlier proposal. However given the awkward situation in which Kota Rani accepted, and the possibility for a counter-uprising, made more probable when accounting for the small slivers of support Kota Ranis till had, Shah Mir could not take any risks. Kota Rani and her two sons were imprisoned, where they later died. Aftermath and Establishment of the Sultanate With Kota Rani defeated, Shar Mir declared himself ruler, taking on the title Sultan Shams-ud-Din. Shams-ud-Din worked to establish Islam in Kashmir and was aided by his descendants. In an effort to keep the local feudal chiefs in check, he raised to power two indigenous families, the Magres and the Chaks. He also introduced a new era to the people of Kashmir, called the Kashmiri Era. This replaced the Laukika Era that had existed prior to this. The Kashmiri Era began with Rinchan's accession and conversion to Islam in 720