During the Livonian crusade in 1218, Pope Honorius III gave Valdemar II a free hand to annex as much land as he could conquer in Estonia.
[4] In 1219, Valdemar gathered his fleet, joined forces with the navy led by prince Wizlav of Rügen,[4] and landed on the northern coast of Estonia in the Lindanise (now Tallinn) harbor in the Estonian province of Revala.
According to the legend, the national flag of Denmark Dannebrog was born at this time, falling from the sky during a critical moment in the fight and helping the Danes to win the Battle of Lindanise against the Estonians.
In 1220, the King of Denmark gave up his claim on the southern Estonian provinces of Sakala and Ugaunia, which had already been conquered by Brothers of the Sword.
On 7 June 1238 the Teutonic Order concluded the Treaty of Stensby at a royal fortress in the south of Zealand with the Danish king, Valdemar II.
Under the treaty, Jerwia stayed part of the Ordenstaat, while Harria and Vironia were ceded back to King of Denmark as his direct dominion, the Duchy of Estonia.
[6] Estonians still call their capital "Tallinn", which, according to an urban legend, derives from Taani linna (Danish town or castle).
[7] First mentioned in 1240, the duchy was locally governed by a viceroy (Latin: capitaneus) appointed by the king and functioning as his plenipotentiary.
[8] In Vironia, the main power centers were Wesenberg (Rakvere) and Narva, built on the site of the old Estonian fortresses of Rakovor and Rugodiv.
One researcher has estimated that 80% of the vassals were Germans from Westphalia, 18% were probably Danes, and only 2% had distinctly Estonian names (Clemens Esto, Otto Kivele, Odwardus Sorseferæ, etc.).
In 1346, Estonia (Harria and Vironia) was sold for 19,000 Cologne marks to the Teutonic Order, notwithstanding the promise by Christopher II in 1329 never to abandon or sell Denmark's Estonian territories.
In 1559, during the Livonian war, Frederick II of Denmark bought the Bishopric of Ösel-Wiek from Prince-Bishop Johannes V von Münchhausen for 30,000 thalers.
The possession was given as an appanage to Magnus, Duke of Holstein, the brother of Frederick II, who landed on Ösel (Saaremaa) with an army in 1560.