against Magnus Erlingsson, was captured by Erling Skakke and killed in Bergen. The action of Erling and the rest of his party in electing Magnus Erlingsson as their leader was a radical one, as it broke with one of the traditional principles of who might become king: Magnus was not a king's son. He was only descended from the ancient royal line through his mother. To compensate for this shortcoming, Erling and Magnus' party allied themselves with the Church and introduced a new criterion: the king should henceforth be of legitimate birth. Their old leader, Inge Crouchback, had been the only one of the sons of Harald Gille to be legitimate, and King Magnus Erlingsson was also Erling and Kristin's legitimate son. The alliance with the Church, which had recently become better organized in Norway after the establishment of a separate Norwegian archdiocese in Nidaros in 1152, became an important asset for Erling and Magnus. In 1163 in Bergen, Magnus Erlingsson became the first Norwegian king to be crowned, aged 7. A written law of succession was also introduced which only allowed the oldest legitimate son to inherit. For the next decade or so, Magnus Erlingsson's position as king, with Erling Skakke as the real leader of the country, seemed secure. Erling ruthlessly eliminated any potential rivals to his son. He was also allied at times with King Valdemar I of Denmark, and according to one source he at one time took the Oslofjord-area as a fief from him. However, the extent of his subordination to Denmark is questionable. King Sverre and the rise of the Birkebeiner In 1174 a new faction arose in rebellion against Magnus Erlingsson. Their leader was the young Øystein Møyla, a son of Øystein Haraldsson. This new faction was called the birkebeiner, meaning birch-legs because some of them were so poor that they wound birch-bark around their legs instead of proper footwear. Øystein Møyla was killed by Magnus and Erling's men at the Battle of Re in 1177. Soon after the Birkebeiner made Sverre Sigurdsson their leader. Sverre had come to Norway from the Faroe Islands and claimed to have recently discovered that he was in fact the son of King Sigurd Munn. His claim was widely disbelieved at the time (as well as by most modern historians). However, after taking over leadership of the Birkebeiner, he became a rallying point for everyone disgruntled with