In the mid-14th century the town passed to the Grand Duchy of Lithuania, which had to surrender it to Ivan III following the Battle of Vedrosha in 1503. In the early 17th century, Toropets was ransacked by the Polish army. In the course of the administrative reform carried out in 1708 by Peter the Great, Toropets was included into Ingermanland Governorate (known since 1710 as Saint Petersburg Governorate). In 1727, separate Novgorod Governorate was split off. Toropets was included into Velikiye Luki Province. In 1772, as a result of the First Partition of Poland, Inflanty Voivodeship and eastern Belarus were transferred to Russia. In order to accommodate these areas, Pskov Governorate was created, and Velikiye Luki was transferred to Pskov Governorate. The town of Opochka was made the administrative center of the governorate. Pskov Governorate has proven to be too big to be administered properly, and in 1776, the decree of the empress, Catherine the Great, was issued. It divided the governorate into Pskov and Polotsk Governorates. Pskov was made the administrative center of Pskov Governorate, and Toropets remained in Pskov Governorate. In 1777, Pskov Governorate was transformed into Pskov Viceroyalty, which was administered from Novgorod by Jacob Sievers. In 1796, the viceroyalty was abolished, and on 31 December 1796 the emperor Paul I issued a decree restoring Pskov Governorate. Toropets was the center of Toropetsky Uyezd of Pskov Governorate.