Under the code name 'Operation Weserübung', Nazi Germany attacked Denmark and Norway on 9 April 1940. On that same day, Denmark surrendered and was occupied. The country was a useful base of operations for the fight against Norway. The Norwegians resisted for two months but surrendered on 9 June 1940. France and Britain helped Norway but were forced to withdraw when they were attacked themselves.
At the time of the German attack, Denmark and Norway were neutral. Germany still attacked the countries because it feared that Great Britain and France planned to occupy Norway. With Denmark's access to the Baltic Sea in German hands, Swedish iron ore could be transported undisturbed to Germany. Sweden remained neutral.