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 occasional Estonian and Couronian pirate 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 Lindanise 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.