Danish Estonia refers to the territories of present-day Estonia that were ruled by Denmark firstly during the 13th–14th centuries and again in the 16th–17th centuries.
Denmark rose as a great military and mercantile power in the 12th century. It had an interest to end the frequent Estonian Viking attacks that threatened its Baltic trade. Danish fleets attacked Estonia in 1170, 1194, and 1197. In 1206, King Valdemar II and archbishop Andreas Sunonis led a raid on Ösel island (Saaremaa). The Kings of Denmark laid a claim on Estonia as their possession, which was recognised by the pope. In 1219 the Danish fleet landed in the major harbor of Estonia and defeated the Estonians in the Battle of Lyndanisse that brought Northern Estonia under Danish reign until the Estonian uprising in 1343, when the territories were taken over by the Teutonic Order and sold by Denmark in 1346.
In 1559 during the Livonian war the Bishop of Ösel-Wiek in Old Livonia sold his lands to King Frederick II of Denmark for 30,000 thalers. The Danish king gave the territory to his younger brother Magnus who landed on Saaremaa with an army in 1560. The whole of Saaremaa became a Danish possession in 1573, and remained so until it was transferred to Sweden in 1645.
Read more about Danish Estonia: Duchy of Estonia, Danish Province of Øsel