Valmiera lies at the crossroads of several important roads, 107 kilometres (66 miles) to the north-east from Riga, the capital of Latvia, and 50 km (31 mi) south of the border with Estonia.
The town may have been named after the kniaz of the Principality of Pskov Vladimir Mstislavich, who became a vassal of Albert of Riga in 1212, and for a short time, it was a vogt of Tālava, Ydumea and Autīne.
After the Battle of Saule in 1236 Valmiera Castle and nearby lands became the property of the newly established Livonian Order.
The actual founding of the town probably occurred at least 40 years earlier when the master of the Livonian Order Wilken von Endorp constructed a castle (Wolmar) and Catholic church on the banks of the river Gauja.
After the Livonian War in 1583 Valmiera was heavily devastated and was incorporated into the Duchy of Livonia as part of Wenden Voivodeship.
After the Polish-Swedish war in 1622 Valmiera was managed by the Lord High Chancellor of Sweden Axel Oxenstierna.
von Hallart opened the first seminary of the Moravian Church in Valmiera, a movement which played an important role in the history of Vidzeme.
During 1911–12 a narrow gauge railway line Ainaži-Valmiera-Smiltene was built thus making Valmiera a major transport hub.
In 1906 Municipal elections were held and Valmiera was one of the few towns in Latvia where Latvians won the majority of seats (18 of 24).
During World War II, Valmiera was captured by troops of the German Army Group North on 4 July 1941 and placed under the administration of Reichskommissariat Ostland.
[5] The city was recaptured on 24 September 1944 by troops of the 3rd Baltic Front of the Red Army during the Riga Offensive.
Many Olympians have come from Valmiera including BMX riders Ivo Lakučs, Edžus Treimanis, Rihards Veide and a two-time Olympic champion Māris Štrombergs.