Norwegian Law of Succession
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 whoever 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.
Steen, Sverre: Tronfølgeloven av 1163 og konungstekja i hundreåret etter (eng: "The 1163 Norwegian Law of Succession and the royals coronations in the following century". (1949)