Since the dissolution of the Kalmar Union, Swedish foreign policy had been aimed at gaining dominion over the Baltic Sea, leading to repeated wars with Denmark from the 1560s onward. After Sweden intervened in 1630 with great success in the Thirty Years’ War on the side of the German Protestants, and Gustav II Adolf became one of Europe’s most powerful monarchs, Sweden defeated Denmark in the two wars of 1643–45 and 1657–58. Finland, provinces in northern Germany and the present-day Baltic republics also belonged to Sweden, and after the Peace of Westphalia in 1648 and the Peace of Roskilde with Denmark in 1658, Sweden was a great power in northern Europe. The country even founded a short-lived colony in what is now Delaware in North America. However, Sweden had a largely agrarian economy and lacked the resources to maintain its position as a great power in the long run.
After its defeat in the Great Northern War (1700–21) against the combined forces of Denmark, Poland and Russia, Sweden lost most of its provinces on the other side of the Baltic Sea and was reduced essentially to the same frontiers as present-day Sweden and Finland. During the Napoleonic Wars, Sweden surrendered Finland to Russia. As compensation, the French marshal Jean Baptiste Bernadotte, who had been elected heir to the Swedish throne in 1810, succeeded in obtaining Norway, which was forced into a union with Sweden in 1814. This union was peacefully dissolved in 1905 after many internal disputes.