Denmark's history has particularly been influenced by its geographical location between the North and Baltic seas. This meant that it was between Sweden and and thus at the center of the mutual struggle for control of the Baltic Sea (dominium maris baltici). Denmark was long in disputes with Sweden over control of Skånelandene (Scanian War) and Norway, and in disputes with theHanseatic League over the duchies of Schleswig (a Danish fief) and Holstein (a German fief).
Eventually Denmark lost the conflicts and ended up ceding first Skånelandene to Sweden and later Schleswig-Holstein to the German Empire. After the eventual cession of Norway in 1814, Denmark retained control of the old Norwegian colonies of the Faroe Islands, Greenland and Iceland. During the 20th century Iceland gained independence, Greenland and the Faroese became integral parts of the Kingdom of Denmark and North Schleswig reunited with Denmark in 1920 after a referendum. During World War II Denmark was occupied byNazi Germany and liberated in 1945, after which it joined the United Nations.