Work on the Valmiera Castle began in 1283. The castle was burned down in 1702 during the Great Northern War, and the city’s walls were torn down in the late 17th century. Ruins of the castle and remnants of other Medieval fortifications have been preserved.