 During the Persian rule it was used as an arsenal, because it was a Sunni mosque, and the new owners, the Persians, were Shia Muslims.In 1827, this mosque was converted to a Russian Orthodox church, and named after the Holy Virgin.This mosque was Shia and was built in the beginning of the nineteenth century, during the reign of the last khan of Erivan Khanate Huseyn-khan.