 He was a member of Jølster municipal council and Sogn og Fjordane county council.In 1997, during the first cabinet Bondevik, he was appointed political advisor in the Ministry of Transport and Communications under Minister Odd Einar Dørum.When Dørum changed ministry to the Ministry of Justice and the Police in 1999, Hamar followed.