The Mamar Mosque was built in eighteenth century in Mamar village of Gubadli district of Azerbaijan. It was used as a warehouse building during the reign of the Soviet Power. After Azerbaijan restored its independence in 1991, the mosque was reconstructed and regained its original function. However, in 1993, as a result of the First Karabakh War of 1991-1994, Armenian Armed Forces occupied the territory of Gubadli district, including Mamar village. The Mamar Mosque was destroyed and transformed into a pigsty.
The Cabinet of Ministers of the Republic of Azerbaijan declared the Mamar Mosque an architectural monument of local importance in 2001.