In 1912 Halvorsen was first elected to the
Storting from the neighborhood of Gamle Aker in the district of
St. Hanshaugen in Kristiania. Halvorsen served Kristiania in the
Parliament from the Conservative Party from 1913 to 1923. He became Prime Minister during 1920 while also serving as
Minister of Justice. He again became Prime Minister in May 1923 while simultaneously serving as Minister of Justice. Between these terms, Halvorsen was leader of the Conservative Party in Parliament and
President of the Storting (
stortingspresident).{{cite web|url = https://snl.no/stortingspresident ==Personal life==