 In the 1930s , Leipzig was used as a training cruiser , as well as to make goodwill visits to foreign ports . She participated in non @-@ intervention patrols during the Spanish Civil War . In the first year of World War II , she performed escort duties for warships in the Baltic and North seas . Leipzig was torpedoed by the British submarine HMS Salmon on 13 December 1939 while on one of these operations . The cruiser was badly damaged , and the necessary repairs took almost a year to complete . She thereafter resumed her duties as a training ship . She provided gunfire support to the advancing Wehrmacht troops as they invaded the Soviet Union in 1941 . 
