 Following the German invasion and occupation of Norway in April 1940, Devik continued at the request of Norway's exiled government, but he was fired in 1941.He was offered a professorship, but declined and spent the next year as a freelance lecturer.In 1942 he was fired from that job too, and in 1943 he fled to the United Kingdom where he worked for the government-in-exile for the rest of the war.