After the death of the last Slav prince, Wizlaw III, in 1325, the principality was acquired by Pomerania-Wolgast as a consequence of the 1321 inheritance agreement (Erbverbrüderung), and from 1368/72–1451 was part of the estate of a branch line, the House of Barth. This state of affairs, together with the disputes over the Danish throne that occurred at that time, led to the Rügen wars of succession. After they had played out, the former principality went in 1354 to Pomerania-Wolgast and thus became part of the Holy Roman Empire. In 1478, Pomerania-Wolgast and Pomerania-Stettin were united and, 170 years later, the combined state went to Sweden in 1648 as a result of the Treaty of Westphalia (see Swedish Pomerania). Rügen was part of Swedish Pomerania from 1648 to 1815. Under Gustav IV Adolf of Sweden the town of Gustavia was constructed on the Mönchgut peninsula, but was abandoned during the Napoleonic Wars. In the years 1678 and 1715, Rügen was briefly wrested from the Swedes by the Elector of Brandenburg, Frederick William and by the King in Prussia, Frederick William I. For example, a Brandenburg-Danish army landed on the island as part of the invasion of Rügen in 1678. After the Treaty of Saint-Germain in 1679 the island passed from Danish to Swedish ownership again. At the time of Napoleonic Wars, Rügen was held by the French from 1807 to 1813. In the Treaty of Kiel of 1814, it was transferred initially from Sweden to Denmark and then fell to Prussia, along with New Western Pomerania (Neuvorpommern), thanks to the Vienna Convention of 1815. In 1818 the island became part of the administrative district of Stralsund and thus belonged to the Prussian Province of Pomerania.