The history of the sanctuary dates back to the 14th and 15th centuries. It existed first time as a tomb. The tomb belonged to Abu Seyid Abdulla who was a scholar and Islamic saint. The location of the sanctuary was known as “Xalfadam” until the middle of the last century. Over time, the tomb of Abu Seyid Abdulla was exposed to destruction. However, the local population of Baku, especially the Baku elites restored it several times. In 1817, son-in-law of Huseyngulu Khan, Qasim Bey financed restoration work of the tomb. The actual construction of the mosque began in the early 20th century, started by construction foreman Karbalai Ahmed, and completed under the direction of the architect
Eugeniusz Skibiński'''' between 1905 and 1914, approximately 90 years after the restoration of the tomb. The mosque was built on the tomb. The construction costs were met by Azerbaijani philanthropist Nabat Khanum Ashurbeyova. The construction of the Taza Pir Mosque took more than nine years due to financial and political issues of that time. Nabat Khanum, who financed several charitable projects simultaneously in Baku, could not afford to complete the mosque. In addition, due to breakout of
Balkan War in 1911, Tsarist Russia had strictly controlled the activities of banks in Baku, assuming that Muslim millionaires could help the
Ottoman Empire so that the Baku millionaires had to get the approval of officials from the Tsarist Department for the amount to be spent on the construction of Taza Pir Mosque. Azerbaijani national industrial magnate and philanthropist, Haji Zeynalabdin Taghiyev, also actively attended in the construction process of the mosque. Only three years after opening the mosque was closed in connection with the
October Revolution in 1917. Over the years the mosque functioned as a cinema and a barn, and since 1943 to present day, as a mosque. The
Akhund of the mosque is the
Grand Mufti of the
Caucasus Allahshukur Pashazadeh. ==Architecture==