The succession to his lands was mainly between George William, Elector of Brandenburg, the heir under a pact between the two families in 1464, and his brother-in-law Gustavus Adolphus, King of Sweden, who had occupied much of Pomerania on entering the Thirty Years' War in 1629. According to Bogislaw' last will, in case of no succession with the House of Pomerania, his lands were to pass to Sweden, not to Brandenburg-Prussia. Both, Sweden and Brandenburg, exploited not only their position as superior military and occupying powers but also the succession conflicts within the House of Pomerania itself. Therefore, when the allocation of territory was decided at the Peace of Westphalia which concluded the war in 1648, Pomerania was carved up and the territories were split between Sweden and Brandenburg. This meant that the Peace of Westphalia marked the end of Pomerania as an autonomous, political entity.