Two years after his brother, Subhan Quli Khan, took the throne of the Khanate in 1680, Abd al-Aziz settled in the mosque to be with his uncle.
During the rule of the Ottoman Sultan, Murad IV, many Uzbeks started to immigrate and settle in Baghdad and the mosque became known for being the center of gatherings of the Uzbek people living in the city at the time who were known to practice the profession of sharpening knives.
[1][2][3] In 1917, the mosque was subjected to change when British soldiers removed the hospice when they entered Baghdad.
The mosque would later be demolished at the time of leader Abd al-Karim Qasim in 1961 during expansion works of the old Ministry of Defense, and it was rebuilt in its current form.
[1] Shortly before it was demolished, teaching in the madrasa was abolished with the last teacher being Sheikh Salem bin Mustafa.