After qualifying for higher education in 1930, Hansson undertook a mercantile education. In 1940 he volunteered as a soldier in the Winter War in Finland, and after the German invasion in Norway he fought in the Norwegian campaign. He was among the pioneers of the resistance organization Milorg from 1940 to 1942, serving for a short period as secretary-general ("Stor O") in the central operative leadership. He had to flee the country in 1942, reaching England in 1943. From 1944 to 1945 he served as Norwegian attaché in Ottawa and Montreal. He was stationed as legation secretary in Lisbon in 1946, and assumed a position in the Ministry of Foreign Affairs in 1948. He was legation secretary in Warsaw in 1949, and served as vice consul in New York City from 1950, and as consul from 1952. In 1960 he was ambassador to Lagos, and from 1964 was consul general in Montreal.