On the early morning of April 9 Germany invaded Denmark and Norway, ostensibly as a defensive maneuver against a planned (and openly discussed) Franco-British occupation of those countries; upon arrival the invading Germans informed the countries' governments that the Kriegsmarine and Wehrmacht came to protect their neutrality against Franco-British aggression.
Denmark was unimportant to Germany strategically or ideologically, except as a staging area for operations in Norway. The country is small and relatively flat, ideal territory for German army operations, so the country with a tiny army had little hope in armed resistance. In the early hours of the morning some Danish regiments engaged the German army, suffering a dozen or so dead. However, the Danish government capitulated almost instantly in exchange for retained political independence in domestic matters, which resulted in an occupation uniquely lenient until the summer of 1943, also postponing the arrest and deportation of Danish Jews until nearly all of them were warned and on their way to Sweden. Fewer than 500 Danish Jews were deported, and fewer than 50 of them lost their lives. (See: Occupation of Denmark for further details)
A description of the invasion of Norway would entail the following:
In the far north, British and German troops fought over the control of the Norwegian winter harbor Narvik, important for the export of Swedish iron ore. The Germans evacuated on May 28, but due to the detoriating situation on the European continent, the British troops were evacuated in Operation Alphabet – and the Germans recaptured Narvik on June 9, by then deserted also by the civilians.
As a consequence, Germany put pressure on neutral Sweden to permit transition of military goods and soldiers on leave. On June 18 an agreement was reached: Soldiers were to travel unarmed and not be part of unit movements. A total of 2,140,000 German soldiers, and over 100,000 German military railway carriages, crossed Sweden until the traffic was officially suspended on August 20, 1943.