The civil war era in Norway (, borgarkrigstidi, borgerkrigstida or borgerkrigstiden) began in 1130 and ended in 1240. During this time in Norwegian history, some two dozen rival kings and pretenders waged wars to claim the throne.

In the absence of formal laws governing claims to rule, men who had proper lineage and wanted to be king came forward and entered into peaceful, if still fraught, agreements to let one man be king, set up temporary lines of succession, take turns ruling, or share power simultaneously. In 1130, with the death of King Sigurd the Crusader, his possible half-brother, Harald Gillekrist, broke an agreement that he and Sigurd had made to pass the throne to Sigurd's only son, the bastard Magnus. Already on bad terms before Sigurd's death, the two men and the factions loyal to them went to war.

In the first decades of the civil wars, alliances shifted and centered on the person of a king or pretender. However, towards the end of the 12th century, two rival parties, the Birkebeiner and the Bagler, emerged. In their competition for power, the legitimacy dimension retained its symbolic power, but it was bent to accommodate the parties' pragmatic selection of effective leaders to realize their political aspirations. When they reconciled in 1217, a more ordered and codified governmental system gradually freed Norway from wars to overthrow the lawful monarch. In 1239, Duke Skule Bårdsson became the third pretender to wage war against King Håkon Håkonsson. Duke Skule was defeated in 1240, bringing more than 100 years of civil wars to an end.

Events of the civil war era

Background The unification of Norway into one kingdom is traditionally held to have been achieved by King Harald Fairhair at the Battle of Hafrsfjord in 872, but the process of unification took a long time to complete and consolidate. By the mid-11th century the process seems to have been completed. However, it was still not uncommon for several rulers to share the kingship. This seems to have been the common way of solving disputes in cases where two or more worthy candidates for the throne existed. The relationship between such co-rulers was often tense, but open conflict was generally averted. Clear succession laws did not exist. The main criterion for being considered a worthy candidate for the throne was to be a descendant of Harald Fairhair through the male line—legitimate or illegitimate birth was not an issue.

King Sigurd the Crusader had also shared the kingdom with his brothers, King Øystein and King Olav, but when they both died without issue, Sigurd became sole ruler and his son, Magnus, heir-apparent. However, in the late 1120s a man called Harald Gille arrived in Norway from Ireland, claiming to be a son of King Sigurd's father, King Magnus Barefoot. King Magnus had spent some time campaigning in Ireland, and Harald would thus be King Sigurd's half-brother. Harald proved his case through an ordeal of fire, the common way of settling such claims at the time, and King Sigurd recognized him as his brother. However, Harald had to swear an oath that he would not claim the title of king as long as Sigurd or his son was alive.

Succession to Sigurd the Crusader

When Sigurd died in 1130, Harald broke his oath. Sigurd's son Magnus was proclaimed king, but Harald also claimed the royal title, and received much support. A settlement was reached whereby Magnus and Harald would both be kings and co-rulers. Peace between them lasted until 1134, when open war broke out. In 1135 Harald succeeded in defeating and capturing Magnus in Bergen. Magnus was blinded, castrated, mutilated and imprisoned in a monastery. He was thereafter known as Magnus the Blind. At about the same time Sigurd Slembe, another man from Iceland, arrived claiming to be a son of Magnus Barefoot. He claimed to have gone through an ordeal by fire in Denmark to prove his claim. Harald did not recognize him as his half-brother. In 1136 Sigurd murdered Harald in his sleep in Bergen, and had himself proclaimed king. Harald's supporters would not accept him and had Harald's two infant sons, Sigurd Munn and Inge Crouchback, named king. Sigurd Slembe liberated Magnus the Blind from his enforced monastic life and allied himself with him. The war between Sigurd Slembe and Magnus the Blind on the one side, and Harald Gille's old supporters with his young sons on the other, dragged on until 1139, when Magnus and Sigurd were defeated in Battle of Holmengrå (Slaget ved Holmengrå) fought near Hvaler. Magnus was killed in the battle, Sigurd was captured and tortured to death.

Harald Gille's sons The power-sharing between Sigurd Munn and Inge Crouchback functioned well as long as they were both minors. In 1142, once again, a king's son arrived in Norway from west of the North Sea. This time it was Øystein Haraldsson, a son of Harald Gille. Øystein claimed part of his father's inheritance and was given the title of king, with a third of the kingdom. The three brothers ruled together, apparently in peace, until 1155. According to the sagas, Øystein and Sigurd Munn laid plans to depose their brother Inge and divide his share of the kingdom between them. At the urging of his mother Ingrid Ragnvaldsdotter and the influential lendmann Gregorius Dagsson, Inge decided to strike first, at a meeting among the three kings in Bergen. Sigurd Munn was attacked and killed by Inge's men before Øystein had had time to arrive in the city. Inge and Øystein then reached a tenuous settlement, but conditions between them soon deteriorated into open warfare, ending with Øystein's capture and murder in Bohuslän in 1157. Whether or not Inge himself ordered the killing of his brother seems to have been disputed at the time. The followers of Inge's dead brothers, Øystein and Sigurd Munn, were not inclined to submit to Inge and instead chose a new pretender (kongsemne), Sigurd Munn's son, Håkon the Broadshouldered. This development has been seen as the first sign of a new stage in the civil wars: The warring parties no longer simply sprung up around a king or pretender but stayed together after the fall of their leader and elected a new figurehead, heralding the formation of more firmly organized warring factions. A figurehead is all that Håkon could have been in 1157, as he was only ten years old. However, his followers had him named king and continued the fight against Inge. In 1161 they succeeded in killing Inge in battle in Oslo.

Magnus Erlingsson and the Church

In 1161 Inge's followers took the same course of action as Øystein's followers had four years earlier and elected a new figurehead rather than submit to Håkon. The choice fell upon the five-year-old Magnus Erlingsson, the son of one of their most prominent leaders, the lendmann Erling Skakke, by his wife Kristin, daughter of King Sigurd the Crusader. Erling, with the title jarl, became the real leader of the faction. The next year they succeeded in defeating and killing Håkon in battle at Sekken in the Romsdalsfjord. The year after that another son of Sigurd Munn, Sigurd Markusfostre, who had been set up as a new pretender 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 the rule of Erling Skakke and King Magnus.

Some materialists among modern historians have tried to read a form of class struggle into Sverre and the Birkebeiner's fight against Erling and Magnus. However, the extent to which Sverre's men actually represented the impoverished strata of the population remains disputed. It is clear that most of the lendmenn—the nobility of the time—sided with King Magnus, but Sverre also quickly won several of them over to his side. In any event, the Birkebeiner did not try to change the social order of society; they merely wanted to place themselves at its top.

In 1179 Sverre won an important victory in the battle at Kalvskinnet (Slaget ved Kalvskinnet) on the outskirts of Nidaros, where Erling Skakke was killed. From that point, the Trøndelag region with Nidaros at its center became a stronghold of Sverre. King Magnus continued the fight after the death of his father and refused several offers from Sverre to divide the kingdom between them. Sverris saga, which was written by Sverre's supporters, makes much of how popular Magnus was among the common people and how this made Sverre's fight against him all the more difficult. The war between Sverre and Magnus raged on for several years, and Magnus at one point had to seek refuge in Denmark. The Battle of Fimreite, a final naval battle during 1184 in the Sognefjord, resulted in the death of King Magnus and victory for King Sverre.

Sverre was to rule Norway until 1202, but was unable to achieve long periods of peace. The Church, allied to King Magnus and Erling Skakke, remained virulent in its opposition to Sverre throughout his reign. In 1190 the archbishop, Eirik Ivarsson, fled the country and in 1194 he received papal support to excommunicate Sverre and order the country's remaining bishops to join him in exile in Denmark, which they did. By then Sverre had been able to coerce one of his strongest opponents, Bishop Nikolas Arnesson of Oslo, to crown him in Bergen in 1194. In 1198 Pope Innocent III placed Norway under interdict. Although Sverre forged letters to show that his excommunication had been lifted, he in fact remained excommunicated until his death.