He contributed strongly to the prevention of the Nasjonal Samling's attempt to gain control of the Confederation of Trade Unions.
[3] Hansteen was executed on 10 September 1941 during the state of martial law which followed the so-called Milk Strike (Melkestreiken).
Hansteen and Wickstrøm were the first two Norwegian citizens executed by the German officials during the five-year occupation of Norway (1940–1945).
After the liberation of Norway in 1945, Hansteen and Rolf Wickstrøm were buried in Vår Frelsers gravlund.
In 1948, a memorial was erected in granite with a bronze relief at the site of Hansteen's execution at Årvoll in the Bjerke district of Oslo.