 His father was the chaplain at Borgund Church at the time of his birth and his maternal grandfather had also been a priest.In 1821 he went to Bergen Cathedral School and he graduated with a Cand.theol.degree in 1832.