The period of the grandiose expansion of Sweden met its limits in two wars: the Great Northern War which ended in the Treaty of Nystad in 1721 and the Hat's War  with the Treaty of Turku in 1743. Sweden lost all its provinces in the Baltic region, and a portion of eastern Finland to Russia. The Valaam Monastery was re-established in Lake Ladoga, and a new main church was consecrated in 1719.  Monks returned to Konevsky Monastery before 1716. The Russian government favoured the activities of the religion they had professed for many centuries. The Emperors and Empresses paid for the reconstruction of burnt or otherwise demolished churches. The Orthodox population of Eastern Finland again had access to making pilgrimages to the monasteries of Solovetsk and Alexander-Svirsky. The Old Believers, a schismatic group of Russians who did not accept the religious reforms of patriarch Nikon in 1666-67, were excommunicated from the Orthodox Church and fled to the outskirts of Russia. They also moved into the remote areas of Finland building three small monasteries there. However, the activity of these monasteries stopped during the following century.
Question: Which occurred first, the Great Northern War or the Treaty of Nystad?
Answer: Great Northern War