When Denmark's King Valdemar I seized the banner and held it high, his troops were filled with renewed valour and went on to vanquish the Estonian defenders.
This helped them establish Danish Estonia around the fortress of Taani-linn, or Tallinn, which literally means “Danish castle”.
This story of the 'Dannebrog', Denmark's beloved national flag, may not be fully backed up by the historical evidence.
But as Torben Kjersgaard Nielsen, Associate Professor in Medieval History at Aalborg University, points out, that's hardly the point.
“We don't talk about whether it's true or not,” Kjersgaard Nielsen, author of the book Dannebrog, told Denmark's Ritzau newswire.”We talk about whether it's a good story, and that it brings a mystical and divine element.”
As part of the celebrations on Saturday, a parachutist recreated the historic scene, bringing a Dannebrog slowly to the ground.
The Dannebrog being brought once again from the sky on Saturday. Photo: Keld Navntoft / Ritzau Scanpix
Denmark's Queen Margrethe II is sailing to Estonia on the royal yacht 'Dannebrog', where she will take part in joint celebrations over the founding of Tallinn, which also shares its 800th anniversary on Saturday.
Queen Margrethe will sail to Tallinn on the Dannebrog yacht. Photo: Keld Navntoft / Ritzau Scanpix
The flag began as a royal symbol and trading banner, then became regimental flag in the Danish army in the 18th Century. It only started to be seen as representing the entire nation in the first half of the 19th century.
Kjersgaard Nielsen said that Danes' use of the flag for birthdays and other celebrations was mostly about creating a sense of occasion.
“We are not thinking especially nationalistically when we put the birthday flag in a home-made cake or when young people come back from a backpacking holiday,” he said.
“But we probably are thinking politically when we for example see political parties using the flag as part of their communications.”
Back in 2016, there was a dispute over politicisation of the symbol when Pia Kjærsgaard, the Speaker of Denmark's parliament, who represents the Danish People's Party, wanted to have a three-meter Dannebrog hung behind her chair.
Christian Juhl, from the Red Green Alliance, complained that this was “close to an abuse of power by the Speaker”, and succeeded in having the size of the flag dramatically reduced.