In 1198, Miajegh, the khwarazmid commander launched a military campaign against Kashan, but after four months ineffective siege of the city, he could only plunder the nearby villages, as Malek Seljuk had done.
During these sieges the tower and ramparts were damaged severely because of stones and fire pots thrown by the mangonels of the invaders, but the destruction was repaired each time.
Under the cover of the castle, Mohammad Khan Torkaman was a nightmare for the defenseless people of Kashan and the villages around it for 12 years.
After the quelling of the riot, because of peace and stability in the era of Abbas I until the late Safavid age, the inner structures of the castle were destroyed gradually and only the thick wall, towers and Yakhchals, which were built with mudbricks, remained.
[2] The last battle of the castle was during the Persian Constitutional Revolution in the time of Nayeb Hossein Khan Kashi's bandits and his sons.