The Norwegian Law of Succession was introduced in 1163. The law was an accord between Erling Skakke and Archbishop Øystein, whereby Erling's son Magnus Erlingsson inherited the throne, in exchange for greater power to the church. Magnus had to promise to obey the pope, while church law was recognised on an equal level with secular laws.
According to the law, there should be only one king, with primogeniture as a rule. If the oldest son was not fit to be king, a council of 60 peasant representatives should select another of the legitimate royal sons. After this they could choose between another of the royal heirs. If the king had no suitable heir, the council could choose whomever they thought would better "guard God's right and the laws of the land". If the peasant representatives could not agree, the bishops should decide the election.