In 1665, Bremen refused to pledge allegiance to Charles X Gustav's successor, Charles XI of Sweden. In March, the Swedish riksråd decided to wage war. Thereupon, 12,000 Swedish troops were transferred to the Duchy of Bremen by the end of the year. In January 1666, Carl Gustaf Wrangel departed from Swedish Pomerania to command the Swedish army, which in early 1666 numbered 14,000 troops. By summer, all of the city of Bremen's territory was occupied, except the city itself. The Swedish chancellor of Bremen-Verden, Esaias von Pufendorf, went to the court in Paris to build an alliance with France. The Swedish position was that France had to intervene on the Swedish side, since Bremen was Swedish according to the Peace of Westphalia, of which France was a guarantor. Pufendorf was however told by Hugues de Lionne that France would not hesitate to declare openly that she read the treaty as Bremen being an Imperial city, rather than provoke a new great war with the Holy Roman Empire and the Dutch Republic with an assault Sweden and France could hardly win. Lionne said Sweden would be better off waiting for a situation when the Dutch and the neighboring German principalities were weak, and then take the city of Bremen by surprise.. What happened first, Peace of Westphalia or Bremen's refusal to pledge allegiance to Charles X and XI?