A bitter conflict that resulted from a collision of the expansionist aims of Denmark and Sweden in the Baltic and became entangled with the contemporary war in Livonia. Frederick II of Denmark’s troops achieved tactical successes on land, but the Swedes compensated with a series of victories at sea. In 1568 the insane Eric XIV of Sweden was deposed by an alliance of the nobility and replaced by John III. The new king swiftly sought peace from the equally exhausted Danes. By the Treaty of Stettin (1570) Denmark’s grip on the entrance to the Baltic remained unbroken, but Sweden retained Estonia. The contest for the dominion of the whole Baltic was not resolved until the Northern War of 1700–21.