The oldest part of the mosque is said to have been constructed by the orders of Harun al-Rashid in 807CE.[2] Later additions were made, the last being during the late Safavid era. The double layered main dome of the mosque is from the Seljuk era, and is locked to the public. It houses some examples of relief calligraphy from medieval times. Renovations have also been carried out on many sections of the mosque.[2]