Nazi Germany's occupation of Denmark was commenced by Operation Weserübung 9 April 1940, and lasted until the German forces withdrew at the end of World War II following their surrender to Allied forces on 5 May 1945. Contrary to the situation in other countries under German occupations during the war, most Danish institutions continued to function relatively unaffected until 1943. The Danish government remained in the country in an uneasy relationship between a democratic and a totalitarian system until German authorities dissolved the government following a wave of strikes and sabotage.
The occupation of Denmark was never an important objective for the German government. The decision to occupy its small northern neighbour was made to facilitate the invasion of the strategically more important Norway; and as a means against the expected British campaign in Norway. German military planners believed that a base in the northern part of Jutland, most importantly the airfield of Aalborg, would be essential to the invasion of Norway, and they began planning the occupation of parts of Denmark, but as late as February 1940, the decision to occupy Denmark had not yet been made. The issue was finally settled when Hitler personally crossed out the words die Nordspitze Jütlands (the Northern tip of Jutland) and replaced them with Dä, a German abbreviation for Denmark.