The church dates back to 1654 and was built by the Jesuit fathers, who also founded the Werdenberg Seminary and the University.
The reconstruction work ended in 1767, when it was consecrated by the first Archbishop of Gorizia Carlo Michele d'Attems.