When the Axis powers invaded Yugoslavia in April 1941, he escaped from Nazi-occupied Maribor to the Italian-occupied Province of Ljubljana. In the summer of the same year he joined the Communist-led partisan resistance, where he worked in the area of culture and propaganda. During the People's Liberation War he emerged as one of the major poets of the Slovene resistance. Several of his battle songs became hugely popular. One of them, Hey, Brigades, became the unofficial anthem of Slovene partisan forces during World War II. It was during this period that he started to use the pseudonym "Matej Bor", which he continued to use also after the war.