In the process of demonstrating its military prowess in the Thirty Years’ War (1618–48) and the First Northern War (1655–60), Sweden won dominance of the Baltic region from Denmark. It entered the 1660s as an empire that included the former Danish provinces of Skåne, Halland, Blekinge, and Bohuslän as well as three prominent German possessions—Bremen, Wismar, and Western Pomerania. Sweden’s recent development as a military power had largely been funded by its allies, however, and it also entered the 1660s with depleted national coffers and a need for monetary support of its fighting forces and ballast for its economy. At the time, Sweden’s monarch, Charles XI, was still a young boy, and the country was ruled by a regency led by Magnus Gabriel De la Gardie.

When France and the Dutch Republic went to war in 1672, the French paid the Swedes just to maintain a force of some 16,000 troops in Sweden’s German possessions, with a greater sum promised should Sweden actually enter the fight. By 1674 Spain, Lorraine, the Holy Roman Empire, Brandenburg and Sweden’s longtime regional rival Denmark had entered the war, forming a Grand Alliance with the Dutch. Largely because France had more than doubled its annual payments but also because it was strategically threatened by a Danish-Brandenburg alliance, Sweden came to France’s aid. Sweden may have had as many as 26,000 troops dispersed among its German possessions when Karl Gustav, Greve (count) Wrangel, led a Swedish army of some l3,000 into Brandenburg, where it was dealt a devastating defeat at the Battle of Fehrbellin in June 1675 by forces commanded by Frederick William, elector of Brandenburg. Reeling, the Swedish army in Wismar and Bremen was set upon by the Danes under the command of Danish King Christian V, while Frederick William turned his forces against the Swedes in Pomerania. By 1678 the Swedes had been expelled from Germany.

In the meantime, the Danes, led by Niels Juel, had dealt the Swedish navy loss after loss at sea. In 1676 Denmark landed some 14,000 troops in Skåne, whose local population had little affinity for the Swedes. In defense of its homeland, the Swedish army was more successful than it had been abroad, most notably in December 1676 at the Battle of Lund (under the direct command of Charles XI, now age 17), and it preserved Skåne as part of Sweden, though the matter of local discontent would continue after the war as the so-called Skåne question. France’s favourable position at the end of the Dutch War allowed it, through the Treaties of Nijmegen, to negotiate the return of Sweden’s lost German possessions and to compel Denmark to renounce its claim to Skåne, with the last agreement coming about formally through the Treaty of Lund between Denmark and Sweden.