Valdemar II, along with Archbishop Anders Sunesen of Lund, Bishop Theoderich von Treyden, and his vassals Count Albert of Nordalbingia and Witslaw I of Rügen, sailed to the northern Estonian province of Revaliaat the beginning of June 1219. The crusading army camped at Lindanise and built a castle there, named Castrum Danorum, which the Estonians called Taani-linn, meaning Danish town. The Estonians sent several negotiators, but they were only playing for time as they assembled an army large enough to fight the Danes. On 15 June 1219, the Estonians attacked the Danes near the castle, right after suppertime. They advanced from five different directions and completely surprised the crusaders, who fled in all directions. Bishop Theoderich von Treyden was killed by the Estonians, who thought he was the king. The Danes were saved by their Wendish vassals, as Witslaw led a quick counterattack which stopped the Estonian advance. This gave the crusaders time to regroup, and the Estonians were routed.
Association with the Dannebrog
Tradition has maintained that the Danish flag appeared at the Battle of Lyndanisse on 15 June 1219. Legend holds that during the battle, in the Danes' hour of need, the Dannebrog fell from the sky and gave them renewed hope. As the Estonians attacked the Danish stronghold, the Danes were hard pressed. Anders Sunesen, the Archbishop of Lund, raised his hands to the sky in prayer, and the defenders held tight as long as his hands were raised. As Archbishop Sunesen became exhausted, he eventually had to lower his arms, and the Estonians were on the verge of victory. Then, a red flag with a white cross fell from the sky, and gave the Danes the victory. This account builds on two different versions from the early 16th century, both based on an even older source. According to legend, Denmark received its national flag, the Dannebrog, during the battle. This legend is mentioned in the last three books of the Gesta Danorum, which describe Danish conquests on the south shore of the Baltic Sea and the Northern Crusades. An edition of the Gesta Danorum was edited by Danish priest Christiern Pedersen, and published by Jodocus Badius on 15 March 1514. This older source set the emergence of Dannebrog as a battle in Livonia in 1208. But the Franciscan friar Peder Olsen rectified the year as 1219. The legend became affixed to the Battle of Lindanise. The legend of Dannebrog as originating in the Northern Crusades holds true, as the red flag with a white cross originated as a crusader symbol.