For over a century, one crown ruled Denmark, Sweden and Norway together
From 1397 to 1523 the Kalmar Union placed Denmark, Sweden and Norway, along with Iceland, Greenland and other Norwegian islands, under a single monarch. It was engineered by Queen Margaret of Denmark to resist German traders, and it unravelled because Swedish nobles never wanted a strong central king.
Margaret, daughter of Valdemar IV of Denmark, married Haakon VI of Norway and Sweden. Their son Olaf took the Danish crown in 1376 with his mother as guardian and added Norway when Haakon died in 1380. After Olaf's death in 1387 left her without an heir, Margaret adopted her great-nephew Eric of Pomerania. Swedish nobles sought her help against King Albert, whom she defeated in 1389, and Eric was crowned ruler of all three realms at Kalmar on 17 June 1397.
The aristocracy backed the project largely to counter the Hanseatic League, the German trading network that had humbled Denmark in a war of 1361 to 1370. Legally the kingdoms stayed separate states, but one monarch steered their domestic and foreign affairs. The arrangement was never perfectly continuous. Eric's clashes with the Hanseatic League meant heavier taxes and disrupted Swedish iron exports, and the Engelbrekt rebellion of 1434 eventually toppled him. In 1468 Christian I pledged Orkney and Shetland against his daughter's dowry for her marriage to James III of Scotland; the money never came, and Scotland annexed the islands in 1472.
After Christopher of Bavaria died without heirs in 1448, Sweden and Denmark repeatedly pulled apart. Karl Knutsson Bonde and Christian of Oldenburg fought over the Swedish throne, and Sten Sture the Elder beat the Danes at Brunkeberg outside Stockholm in 1471. Sweden was then run mostly by regents known as protectors of the realm, while Danish kings tried to reassert control.
The last act came when Christian II invaded in 1520, defeated Sten Sture the Younger at Bogesund, took the Swedish crown and ordered mass executions of Sture's supporters, the Stockholm Bloodbath. Sweden broke away for good when Gustav Vasa was elected king on 6 June 1523, and in 1524 Frederick I gave up his claim to Sweden in the Treaty of Malmö.
Source: Kalmar Union