Although widely known as Metekhi, this church was actually named Holy Virgin Mary church, built by King Demetrius II in the XIII century on the base of an older church that was built in 480 CE. King Vakhtang Gorgasali whose monument stands just next to the temple, was the one initiating it's construction back in the 5th century.
During the reign of Queen Tamar, in the XII century, a royal castle and church were located here, carrying the name of Metekhi fortress.
Unfortunately, Metekhi fortress was destroyed in 1819 on the order of Russian imperial general Alexey Yermolov, and a jail was built in its place, damaging the church in the process. You can still see the names and dates of former prisoners carved onto the church walls.
In 1933, the prison was demolished by the communist regime. In 1937, the Soviet leadership was considering to tear down the church as well, but changed its mind when confronted by a significant level of resistance from the locals, including famous artists: painter Dimitri Shevardnadze, theater director Sandro Akhmeteli, writer Mikheil Javakhishvili, art historian Giorgi Chubinashvili.
Metekhi church regained its status in 1988, when church services were resumed. It is open for visitors as well.