Ivangorod (Иванго́род; Jaanilinn; Jaanilidna) is a town in Kingiseppsky District of Leningrad Oblast, Russia, located on the east bank of the Narva river which flows along the Estonia–Russia international border, west of St. Petersburg. The town's population was recorded as Ivangorod is a major border crossing point and a railway station by the Tallinn–St. Petersburg line. It is located just opposite to the Estonian town of Narva. The town is the site of the Ivangorod Fortress, a prominent fortification monument of the 15th and the 16th centuries. The fortress, established in 1492 during the reign of Ivan III of Moscow, took its name (literally: Ivan-town — gorod in Russian means "town" or "city") from that of the Tsar. Between 1581 and 1590 and from 1612 to 1704, Sweden controlled the area. Ivan was said to have blinded the fortress's architect to prevent him from building such a structure for anyone else. Ivangorod was granted town privileges and administered as a Russian township under the Swedish Empire (who conquered it in 1612 from boyar Teuvo Aminev) until 1649, when its burghers were ordered to remove to a Narva suburb. In 1617 Russia and Sweden signed the Treaty of Stolbovo, which placed the area under Swedish sovereignty. Russia reconquered it during the Great Northern War in 1704. Despite other changes in territory and sovereignty, Ivangorod was considered an administrative part of the town of Narva from 1649 until 1945. In 1780, Ivangorod, together with Narva, was included into Narvsky Uyezd of St. Petersburg Governorate. In 1796, Narvsky Uyezd was abolished and merged into Yamburgsky Uyezd. In July 1917, Narva district, including Ivangorod, voted in referendum to join recently formed Autonomous Governorate of Estonia. The city was captured by the Imperial German Army during World War I after the Russian Army abandoned the local fortress. During the Estonian War of Independence (1918–1920), the newly independent Republic of Estonia established control over the whole of Narva, including Ivangorod, in January 1919, a move which Soviet Russia recognized in the 1920 Treaty of Tartu.