From the 9th century, the eastern coast of the gulf belonged to Veliky Novgorod and were called Vodskaya Pyatina. As a result of the 1219 crusade and the Battle of Lindanise, the Northern Estonia became part of Denmark (Danish Estonia). In the 12th century, the city Reval (, ) was established on the territory of modern Tallinn. As a result of the Estonian uprising in 1343, the Northern Estonia was 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.