During the German invasion of Norway in April 1940, "Z17 Diether von Roeder" was tasked to attack Narvik and participated in both the First and Second Naval Battles of Narvik. She was damaged by British destroyers during the first battle and was one of the last surviving German destroyers during the second battle. After the British knocked out all of her guns, the ship was run ashore to allow the crew to abandon ship. They attempted to scuttle "Z18 Hans Lüdemann" with explosives to prevent her capture, but something went wrong and the British were able to board her. A British destroyer torpedoed her wreck to prevent any repairs.