The white and blue Our Lady of Sorrows Church was the first stone church built in Riga after the Reformation had reached Livonia (a historic region once encompassing present-day Latvia and Estonia). The idea of constructing the church was especially supported by Holy Roman Emperor Joseph II. The Classicism-style building was dedicated to Our Lady of Sorrows symbolising the oppressed Catholic Religion in Terra Mariana.
Our Lady of Sorrows Church was preceded by a modest and small chapel build under Father Isidor Schmidt and noticed by Emperor Joseph II, who paid a visit to Riga in 1780. Emperor promised to talk to Catherine II in order to get her consent to building a new Catholic church. The construction began after four years and was finished in 1785.
According to an order by the Empress of Russia, the church was designed in the Classicism style like the all surrounding buildings on Pils Square. It was dedicated to Our Lady of Sorrows as a symbol to the oppressed Catholic Religion in Terra Mariana. The name also applies to the bellfry which was erected rather low and unpretentious.
From 1858 to 1860, the church was rebuilt according to design of Riga architect Johann Felsko - the presbytery was located in the SW wing, with a new sacristy being added and the facade being changed into the Pseudo-Roman style. Only the white and blue colours still remind one of its Classicism past.