The Succession law was an accord between Erling Skakke and Øystein Erlendsson, Archbishop of Nidaros. Erling Skakke was married to Kristin Sigurdsdatter, the daughter of King Sigurd Jorsalfar. They had a son, Magnus Erlingsson, who was deemed to be a legitimate claimant to the throne, which was left vacant with the death of King Haakon II. Archbishop Erlendsson agreed to terms under which Magnus inherited the Norwegian throne, in exchange for greater power afforded to the Church. Magnus was crowned king in 1163 at the age of eight and the succession law was enacted simultaneously. As king, Magnus had to promise to obey the Pope, while Church law was recognized on an equal level with secular laws. Erling took the title of earl and held the real power, since Magnus was a minor. 
According to the Succession 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 sixty 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 representatives could not agree, the bishops of the Church should decide the election.