linguistic:paraphrasing
Livonian War

In 1547, the Tsardom of Russia was officially proclaimed when Ivan IV was crowned as tsar of all Russia. The tsar sought to gather the ethnically Ruthenian lands of the former Kievan Rus', engaging with other powers around the Baltic Sea in the Livonian War.

During the reign of Sigismund II Augustus in Poland and Lithuania, Tsar Ivan IV invaded Livonia, first in 1558 when the Livonian Knights sought an alliance with Poland and Lithuania; the Poles and Lithuanians were able to defend only southern Livonia. Lithuania and Poland were initially allied with Denmark and fought against the Tsardom of Russia allied with Sweden; after several years the coalitions changed and Poland–Lithuania allied themselves with Sweden against Russia and Denmark. Eventually, the 1570 ceasefire divided Livonia between the participants, with Lithuania controlling Riga and Russians expanding access to the Baltic Sea by taking hold of Narva.

The Lithuanians felt increasingly pressured by the Tsar; further, Lithuanian lesser nobility pressured the Grand Duke and magnates for gaining the same rights as Polish nobility (szlachta), i.e. the Golden Freedoms. Eventually, in 1569, after Sigismund II Augustus transferred significant territories of the Grand Duchy to Poland and after months of hard negotiations, Lithuanians partially accepted Polish demands and entered in alliance with the Union of Lublin, forming the Polish–Lithuanian Commonwealth. In the next phase of the conflict, in 1577, Ivan IV took advantage of the Commonwealth's internal strife (called the war against Danzig in Polish historiography), and, during the reign of Stefan Batory in Polish–Lithuanian Commonwealth, invaded Livonia, quickly taking almost the entire territory, except for Riga and Reval (now Tallinn). That war would last from 1577 to 1582.

Stefan Batory replied with a series of three offensives against Russia, trying to cut off Livonia from the main Russian territories. During his first offensive in 1579 with 22,000 men, he retook Polatsk, Polish–Lithuanian troops also devastated Smolensk region, and Severia up to Starodoub. During the second, in 1580, with 29,000-strong army Stefan Batory took Velizh, Usvyat, Velikiye Luki. In 1581 the Lithuanians burnt down Staraya Russa, with a 100,000-strong army Stefan Batory started the Siege of Pskov but failed to take the fortress. The prolonged and inconclusive siege led to negotiations, which with the aid of papal legate Antonio Possevino ended in the peace of Jam Zapolski in which the Tsar renounced his claims to Livonia and Polotsk but conceded no core Russian territories. The peace lasted for a quarter of a century, until the Commonwealth's forces invaded Russia in 1605.