When Norway was invaded by Germany Starheim joined the Norwegian Army opposing the invasion, but was soon captured. He later went to Sweden and attempted to make his way to the United Kingdom from there, but could not find a way to do so. He returned to Norway, and after slowly accumulating enough fuel, made his way to the United Kingdom on the boat "Viking" from Rauna, near Farsund, together with two other men. The boat set off on 11 August 1940, but was forced back the next day by bad weather. On 13 August "Viking" set off again, and reached Aberdeen on 17 August despite encountering another storm during the voyage across the North Sea.