Estonia under Swedish rule (1561–1710) signifies the period of time when large parts of the country, and after 1645, entire present-day Estonia, were under Swedish rule. In the wake of the breakup of the State of the Teutonic Order, the Baltic German local nobility in the areas of Harrien (Harjumaa) and Wierland (Virumaa), as well as the city of Reval (Tallinn) in June 1561 asked for and were granted protection by the Swedish king Eric XIV, leading to Swedish involvement in the Livonian War. At the conclusion of hostilities in 1583, Sweden was in control of the northern parts of modern Estonia and Dagö ; the Duchy of Estonia was created from this territory. Following renewed wars between Poland and Sweden, the southern parts of present-day Estonia were incorporated into Sweden by the Treaty of Altmark in 1629. Sweden also conquered the island of Ösel (Saaremaa) from Denmark, and were thus in control of all of present-day Estonia.