The Dannevirke after which the town was named is an extensive Viking Age fortification line in Denmark which had a strong emotive symbolic role for 19th-century Danes, especially after the site had fallen into German hands in the German-Danish War of 1864 – a recent and very painful event for these settlers. The settlement quickly earned the nickname of "sleeper town", as the town's purpose was to provide tōtara sleepers for the Napier–Wellington railway line. At one stage the area had 50 operating sawmills. After the native bush was cleared, the land was turned into pasture for grazing animals.
