Second Schleswig War (1864), eventually resulting in a Danish defeat and subsequent German annexation. In this hostile context, the Danevirke played an important role, at first as a mental cultural barrier against Germany, but soon also as a concrete military fortification, when it was strengthened with cannon emplacements and entrenchments in 1850 and again in 1861. In the early 1800s Dannevirke was adopted as the title of several Danish nationalist journals dealing specifically with the question of Danish autonomy vis-à-vis Germany, the most notable of these being published by N. F. S. Grundtvig in 1816–19. In earlier times, the Danevirke had indeed defined a cultural and linguistic border between Danish and German fiefdoms, but the cultural and linguistic frontiers had gradually moved north, and by the 19th century territory as far north as Flensburg was predominantly German-speaking, but remained part of Denmark. Archaeological record Archaeological excavations in 1969–1975 established, with the help of dendrochronology, that the main structure of the Danevirke had been built in three phases between AD 737 and 968. It is, therefore, contemporary with Offa's Dyke on the border between Wales and England, another great defensive structure of the late 8th century. Recent investigations suggest that the Danevirke was not only, and not even primarily, built for military purposes. The archaeologist Henning Hellmuth Andersen found that in an early stage the main "wall" consisted of a ditch between two low embankments. The historian argued that the Kograben (Danish: Kovirke) south of the main wall consists of an embankment accompanied by a ditch on its northern side, which would have been counterproductive for a Danish fortification. Rather, the main construction, in its earliest stage, and the Kograben would have been shipping canals. The existence of a shortcut for shipping between the Baltic and the North Sea via the Schlei in the east and the rivers Treene and Eider in the west had long been recognized, but historians had previously believed that boats had been moved between the Schlei and Treene by portage on rollers. New carbon-14 dating in 2013 has revealed that the second stage started around 500 AD, and the oldest fortifications are even older than that. Previous carbon-14 dating had dated some of the early constructions to the second half of the 7th century, and dendrochronology also suggests that the examined constructions began not very long after 737, about 70 years before the reign of king