On 9 April 1940 Norway was invaded by Nazi Germany. During the subsequent occupation, Fasting was installed by the Germans as mayor of Hamar on 1 January 1941. In July 1941 he was installed as chairman of Hamar, Vang og Furnes Kommunale Kraftselskap.