The fortress was built during the Ottoman rule in 1582–83 by Serdar Ferhat Pasha. The fortress was destroyed by an earthquake in 1679. After the earthquake, the Safavid governor of Erivan, Zal Khan, asked the Shah for help to rebuild Erivan, including the fortress and the Palace of the Sardars.