After the victory over Kazan the Baltic question became the major one for the Moscow Tsar. The fight for the Baltic territories was fraught with the danger of a conflict with the countries of the Central and Northern Europe. In January 1558 the Tsar levied the Livonian War on the plea of the hold-up of European masters who were on their way to Moscow. They were stopped in the territory of the Order. The second reason was a non-payment of a tribute for the city of Yuryev (Derpt).
The first stage of the war, seemingly, validated Ivan IV's position. Narva, Derpt, Fellin and Marienburg fell under the attacks of Russian armies. The Grandmaster was captured. It caused the collapse of the Order in 1561. G. Ketler, the last Grandmaster (elected in 1559), recognized vassal dependence on the Polish King Sigizmund II and was given Kurland. The rest of the Order's territories passed to Sweden and Denmark. Russia having laid the claims to the Baltic territories now faced powerful states.
Far from friendly relations between Sweden and Denmark at that moment distracted their attention from Moscow. But joint Polish-Lithuanian armies of Sigizmund II August also represented a serious danger that demanded consolidation of all Russian power. The last big victory of Russian troops was a seizure of Polotsk in February 1563.
Defeats at the river Usa in January and at the Orsha in July 1564 showed that forces of Russia were at the breaking point. While the military operations of the first third of XVI century were mere campaigns and were not so burdensome, now Russian Army fought without any break since 1547. The peasantry was exhausted by the hard burden of taxes, landlords' estates also suffered from the same load. At this very time the terror found its first victims. Later it developed into dreadful Oprichnina.
The Polish King Stefan Batory In 1578, and Sweden in 1579 won from Russia the biggest part of Livonia. Danish Prince Magnus proclaimed by Moscow the King of Livonia in 1570 came over to the side of Rech Pospolitaya in 1578. The Swedes captured Narva. Stefan Batory reached Pskov in 1581. Only due to heroic resistance of Pskov people he failed to seize the city. Pskov survived through a siege of a 100 thousand strong Polish-and-Lithuanian army. This failure compelled Stefan Batory to sign an armistice with Russia in Yamsk-Zapolye in 1582. Rus lost Polotsk and captured Livonian lands. According to the armistice with Sweden concluded in Plussa in 1583 Russia gave away Narva, Yam, Koporye, Ivangorod, but preserved the mouth of the Neva.
Despite of the lost war, Russian government did not consider the struggle for the Baltic finished. And so, the attempts to make an alliance with England were even more active in 1582-1584. The threat from Rech Pospolitaya (the Polish and Lithuanian State united in 1569 under the Lyublinsk Union) was not liquidated in the second half of XVI century. King Stefan Batory hoped to realize his plans to conquer Russia and organize a campaign against Osmanian Empire.
After the death of Stefan Batory in 1586 Lithuanian magnates supported Tsar Feodor, the nominee of Godunov's government for the Polish throne, however, the Seym elected the Swedish Prince Sigizmund Vaza - Sigizmund III. It reinforced the Polish-Swedish dynastic union (in 1592 Sigizmund simultaneously became the King of Sweden). A new war started by Moscow against Sweden in 1590 was intended to return Russian territories in the Baltic coast lost during the Livonian War. This war ended in Tyavzinsk peace treaty in 1595. Russia regained Yam, Koporye, Ivangorod, Nienschanz, Korela, Oreshek and even a part of the Baltic coast, but without harbours. Narva was preserved by Sweden.
The situation at the southern borders of Russia remained unstable because of attacks of the Crimean Tatars. The last raid of the Crimean hordes under the command of Khan Kazy-Girey was stopped by Russian armies at the Danilov Monastery near Moscow in 1591. Active military pressure made by Boris Godunov's government compelled the Crimean Khanate to sign the peace treaty with Moscow in June 1598. In 1600 Boris Godunov achieved very important diplomatic success: he concluded Russian-Polish armistice for 20 years. Thus, international situation of the Russian State had been stabilized by the beginning of XVII century. Though, the basic problems of Russian foreign policy still remained unsolved.