The peace between Finland and the Soviet Union removed some of the stress on the party, but on 9 April 1940 Denmark was occupied by Germany. Larsen was in Moscow at the time but on 22 April he managed to get back to Copenhagen with instructions for how to deal with the situation. At that time, the Communist Party of Denmark was still legal, but the Comintern, as well as Danish party leadership, was expecting that the party would soon be banned. The communists were to try to remain a legal party for as long as possible and use the time to prepare to go underground. In spite of these expectations, the Danish police took the communists by surprise when leading communists were arrested on 22 June 1941. The party as well as the communist ideology was banned two months later on 22 August when parliament passed the Communist Law.