The building was first mentioned in written documents in 1209. Initially it consisted of a rather small hall with three isles of the same height and width and, possibly, with a separate bell tower. The present-day basilica with three isles came about after the reconstruction work in the 15th century. The altar section was built in early 15th century in Gothic design analogous to St Mary Church in Rostock under the guidance of Rostock architect Johann Rummeschotel. The over 130m high Gothic steeple was completed by the end of the 15th century, which later collapsed in 1666. In 1690 the Riga city master builder Rupert Bindenschuh built a new steeple, only this time in the Baroque design with several vaults and passageways. At the time the wooden steeple was the highest construction in the world. Meanwhile, the western facade of the building with three illustrious stone portals was erected. In 1721 the church steeple was struck by thunder and burnt down. Ordered by the Russian tsar Peter I, who was in Riga at the time and helped extinguish the fire, the steeple was restored in its earlier shape in 1746. During Wolrd War II the church was demolished – the steeple and the roof were burnt down and the entire church interior was destroyed.
Systematic restoration work commenced in 1954. At first the tile roof was restored, and in 1967 a the unique restoration of the steeple began. Unlike its predecessors the new steeple was a metal construction with an inbuilt elevator providing access to vantage platforms. The steeple is 123,25m high. Visitors can take the elevator up to the second passage of 72m. The elevator can be reached via ferroconcrete stairs installed into the side chapels. The church restoration was completed on 29 June 1973, carried out by several specialised organisations under the auspices of the Scientific Restoration Board at the Ministry of Culture. The reconstruction was devised by architects P.Saulītis and G.Zirnis; reconstruction supervisor was Ē.Darbvaris.
In July 1975 the renovated tower clock was revived, which in line with an old tradition has only one clock-hand. The bell-tune rang out for the first time in 1976 - it plays a well-known melody of the Latvian folksong "Rīga dimd" five times a day while the bell rings every full hour.
The restoration of church interior was fully completed in 1983. The church hall leaves a magnificent impression, weighty pillars support the ceiling full of crossed and stellar vaults. In the middle isle the height reaches 30m, covered with additional vaults. The altar section with a ring of five chapels is a distinct manifestation of Gothic verticality and delicate profiling. A burial chamber in the cellar was restored as well, including a Baroque crypt of the Blue Civic Guard. Restoration is still underway in wood-carved epitaphs which during the war were kept in Poland. On 21 August 1995 a plaque was unveiled as a tribute to the restorators of St Peter’s Church.
The new pulpit was designed by architects P.Saulītis and I.Maurāne, the restoration work done by the joint-stock company "Restaurators" in 1996. Funds were donated by the Baltic German support group "Forderkreis" in Germany. In 1997 the stained glass windows of the sacristy originally designed by E.Tode were restored (stained glass artist I.Kārkluvalka) and its walls laid out with recreated Dutch tiles (ceramic artists I.Pētersone, D.Zvanītāja, I.Vipule).
The spacious church hall is used for concerts, art exhibitions, and exhibitions of architecture contests. Regular church services were resumed on 29 June 1991.
St Peter’s Church has become a rare cultural and art centre where visitors gain an insight of both past and present traditions in architecture and art. They also gain a future vision of Riga and its prospective development.