Finally in this age of chaos Shah Mir organized an uprising against Queen Kota Rani and defeated her at Jayapur (modern Sumbal). The defeat upset her and seeing the indifference of the Hindu grandees and general public, she stabbed herself to death, because Shah Mir wanted to marry her. Her death in 1339 paved the way for the establishment of Shah Mir dynasty rule in Kashmir.