Margraviate of Brandenburg fief of the Polish–Lithuanian Commonwealth, to which the electors paid homage. The electors of Brandenburg spent the next two centuries attempting to gain lands to unite their separate territories (the Mark Brandenburg, the territories in the Rhineland and Westphalia, and Ducal Prussia) to form one geographically contiguous domain. In the Peace of Westphalia ending the Thirty Years' War in 1648, Brandenburg-Prussia acquired Farther Pomerania and made it the Province of Pomerania by the Treaty of Stettin (1653). In the second half of the 17th century, Frederick William, the "Great Elector", developed Brandenburg-Prussia into a major power. The state constructed Brandenburg's
Stralsund Treaty of Stettin (1630), the town became one of two major Swedish forts in the Duchy of Pomerania, alongside Stettin (now Szczecin, Poland). After the war, the Peace of Westphalia (1648) and the Treaty of Stettin (1653) made Stralsund part of Swedish Pomerania. Lost to Brandenburg in the Battle of Stralsund (1678), it reverted to Sweden in the Treaty of Saint-Germain-en-Laye (1679). In the Great Northern War in 1715 Charles XII led the defence of Stralsund for a year against the united European armies. Stralsund remained under Swedish control until the Battle of Stralsund (1807), when Napoleon Bonaparte's army occupied