Nyenschantz (Ниенша́нц, Nienshants; Nyenskans; Nevanlinna) was a Swedish fortress at the confluence of the Neva River and Okhta River, the site of present-day Saint Petersburg, Russia. Nyenschantz was built in 1611 to establish Swedish rule in Ingria, which had been annexed from the Tsardom of Russia during the Time of Troubles. The town of Nyen, which formed around Nyenschantz, became a wealthy trading center and a capital of Swedish Ingria during the 17th century. In 1702, Nyenschantz and Nyen were conquered by Russia during the Great Northern War, and the new Russian capital of Saint Petersburg was established by Peter the Great in their place the following year.
During excavations in 1992–2000 the remnants of three different medieval fortresses were found at the site of the Nyenschantz fortress. The only one of them that is known historically is the Swedish fortress Landskrona, built in the year 1300 by Tyrgils Knutsson, who was the Lord High Constable of Sweden. Landskrona was a very large and unusually well fortified wooden fortress with eight towers. In the spring of 1301 the Russians amassed a large army and laid siege to the fortress. When a fire broke out inside the fortress the Swedes retreated to the basement. The last of the Swedish defenders were captured and the Russians burned down the fortress.
In 1609, the Vyborg Treaty was signed by Sweden and Tsardom of Russia as a package of military agreements that were supposed to be mutually beneficial to both countries. It was signed by King Charles IX of Sweden and Vasili IV (also known as Vasily Shuisky) of Russia in the Swedish city of Vyborg, located on the Karelian Isthmus close to Russian territory. The treaty came at an unstable period in Russian history known as the Time of Troubles, where the death of Tsar Feodor I in 1598 led to decades of civil war. In 1605, following the death of de facto ruler Boris Godunov, Vasily Shuisky came to power, triggering a conflict with a pretender to the Russian throne, False Dmitry II.