The mosque again underwent necessary repairs in 1506 (912 AH - under the reign of Shāh Ismā‘īl I), which were initiated by the guardian of the mosque at the time, Mirza Habibullah Sharifi. The mosque was again repaired in 1588 (997 AH) when half of the structure collapsed as a result of an earthquake. During the nineteenth century, the mosque was damaged several times and was subsequently repaired. In 1827 (1243 AH), Fat'h ‘Alī Shāh Qājār presented an ornamental railing for the tomb. Another earthquake shook the mosque in 1852 (1269 AH), and repairs were carried out by Muhammad Nasir Zahir ad-Dawla.