In the end of XIV and in the beginning of XV century the pressure from The Great Lithuanian Princedom upon Russian Lands increased considerably. Since 1392 the Grand Duke Vitovt, a cousin of Vladislav Yagailo, the King of Poland, ruled in the Great Lithuanian Princedom. In 1390 he gave his daughter Sofia in marriage to Vasily Dmitriyevich. The vast territories of Western Russia were under the power of Vitovt at that time: Kiev, Novgorod-Seversky, Polotsk, Vitebsk, Smolensk.
The Grand Duke Vitovt entered into an alliance with Khan Tokhtamysh, having promised him military assistance against a mighty Central Asian ruler Timur (Tamerlan). In 1395 Timur smashed Tokhtamysh and subjugated the Golden Horde. Khan Tokhtamysh fled to Lithuania. This campaign of Timur touched as well a part of Russian territories - chasing the Golden Horde Khan the conqueror came to the southern borders of the Ryazan Princedom.
Vasily I, wishing to prevent a new devastating attack on Russia, set out with an army to Kolomna. But Timur just plundered a part of the Ryazan Lands, took a boundary city of Elets, and turned the horde back to the steppe. In 1396 Vasily Dmitriyevich and Vitovt signed a treaty against the Horde. The next year the Lithuanian armies beat the Horde. But the next campaign of the Duke Vitovt in 1399 finished in the defeat of joint Russian-Lithuanian army. In the battle on the river Vorskla they were crushed by Emir Edigei, who managed to retain for a while a part of the Golden Horde territories under his power after the death of Timur (1405).
In the beginning of XV century Russian-Lithuanian relations worsened abruptly. It was provoked by the capture of the Smolensk Princedom in 1404 by Lithuania and the yearning of the Grand Duke Vitovt to distribute his power over Pskov, Novgorod and the cities of the upper Oka. There occurred a number of armed conflicts in the years of 1406 - 1408 between Moscow and Vilno. As a result, a peace treaty was concluded in 1408. It set the Eastern border of the Lithuanian Princedom along the Ugra River.
One of the main reasons that stopped advance of Vitovt on Russian Lands was the war of the Poland Kingdom and the Great Lithuanian Princedom against the Teutonic Order, which began in 1409. A decisive battle took place on July 15, 1410 near Grunwald Settlement at the border of Poland and the Order. Lithuanian-Russian (Smolensk regiments were in the structure) and the Polish Armies under command of Yagailo and Vitovt defeated the knights. The Grunwald Victory put an end to the Teutonic Order aggression in the territory of Poland and Lithuania.
Later on, a common for Vasily I and Vitovt threat from the Horde resulted in establishment of allied relations between them. At the same time, having abandoned attempts to obtain new Russian territories, Vitovt tried to set free the Russian lands that formed a part of his princedom from dependence of the Moscow Metropolitan and established the Kiev Metropolia.
In the autumn of 1408 Edigei suddenly intruded into the lands of Northeast Russia. The Grand Duke Vasily I had no time to muster armies and left Moscow for Kostroma. Almost during the whole December Edigei besieged the capital of the Princedom. He also sent troops and plundered Rostov, Dmitrov, Pereyaslavl, Serpukhov, Vereya and other cities. Distempers that began in the Horde itself forced Edigei to raise the siege from Moscow; but he forced the city to pay of a huge ransom. After the invasion of Edigei the Horde Yoke gained strength again. But, Vasily I went to the Horde only three years later, in 1412, on the occasion of the accession of a new Khan, the son of Tokhtamys. While the Horde was gradually decaying, being torn apart by internal political conflicts, The Northeast Russia, under the power of the Moscow Duke, gained economic and political influence.
Strengthening of the Moscow Princedom was substantially contributed by its internal stability, absence of princely civil strifes right up to the year of 1425.