After the outbreak of World War II in September 1939, "Emden" took part in laying a defensive minefield off the German coast in the North Sea on 3 September, along with several light cruisers and destroyers. The barrier stretched across the German Bight from the coast of the Netherlands to the Jutland peninsula; the purpose of the minefield was to secure the seaward flank of the "Westwall". She conducted the operation with the other light cruisers "Nürnberg", "Leipzig", "Köln", and "Königsberg" and sixteen destroyers. After laying her first set of mines, she returned to Wilhelmshaven to restock her mines. While "Emden" was moored in the harbor, a force of ten British Blenheim bombers attacked the port on 4 September; German anti-aircraft gunners in the city shot down four of the five bombers, one of which inadvertently crashed into the ship. Nine men from "Emden" were killed and another twenty were wounded in the crash; these were among the first casualties of the German fleet during the war. "Emden" then transferred to the Baltic, where she was assigned to commerce protection duties. She returned to Wilhelmshaven for periodic maintenance from 2 December to 3 January 1940, after which she resumed training duties. During the shipyard period, a degaussing coil was installed just above the waterline to protect the ship from magnetic mines and her anti-aircraft armament was strengthened. After the work was completed, "Emden" returned to training duties through the winter of 1939–1940.