Ivan III considered himself an heir to the fallen Byzantine Empire and defender of the Orthodox Church. He proclaimed himself sovereign of all Rus' and claimed patrimonial rights to the former lands of Kievan Rus'. Such ambitions led to the steady growth of Muscovite territory and power. The Mongol Yoke ended in 1480 with the defeat of Akhmat Khan of the Golden Horde in the Great stand on the Ugra river. Moscow extended its influence to the Principality of Ryazan in 1456, annexed the Novgorod Republic in 1477, and the Principality of Tver in 1483. Further expansionist goals of Ivan III clashed with the Lithuanian interests. Around 1486-87, territories along the ill-defined Lithuanian-Muscovite border in the upper reaches of the Oka River were under attack by Muscovy, allied with Meñli I Giray, khan of the Crimean Khanate. Tensions continued to rise. In August 1492, without declaring war, Ivan III began large military actions: he captured and burned Mtsensk, Lyubutsk, Serpeysk, and Meshchovsk; raided Mosalsk; and attacked territory of the Dukes of Vyazma. Orthodox nobles began switching sides to Moscow as it promised better protection from military raids and an end to religious discrimination by Catholic Lithuanians. Ivan III officially declared war in 1493, but the conflict soon ended. Grand Duke of Lithuania Alexander Jagiellon sent a delegation to Moscow to negotiate a peace treaty. An "eternal" peace treaty was concluded on February 5, 1494. The agreement marked the first Lithuanian territorial losses to Moscow: the Principality of Vyazma and a sizable region in the upper reaches of the Oka River. The lost area was estimated to be approximately 87,000 km2 . A day before the official confirmation of the treaty, Alexander Jagiellon was betrothed to Helena, daughter of Ivan III .. Who got the territory in the upper reaches of the Oka River in the agreement?