In 1558 Ivan IV of Russia invaded Livonian Confederation (the territory of the present-day Estonia and Latvia). Starting the Livonian War (1558–1582), a military conflict between the Tsardom of Russia and a coalition of Denmark, Grand Duchy of Lithuania, Kingdom of Poland (later the Polish–Lithuanian Commonwealth), and Sweden. Treaty of Jam Zapolski in 1582 between Russia and the Polish-Lithuanian Commonwealth Russia renounced its claims to Livonia. The following year, the Tsar also made peace with Sweden. Under the Treaty of Plussa, Russia lost Narva and the southern coast of the Gulf of Finland, being its only access to the Baltic Sea. The situation was partially reversed 12 years later, according to the Treaty of Tyavzino which concluded a new war between Sweden and Russia.