The Norwegian Battle of Kalvskinnet outside Nidaros. Earl Erling Skakke is killed, and the battle changes the tide of the civil wars.

The civil war era in Norway (Norwegian: 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 Brdsson became the third pretender to wage war against King Hkon Hkonsson. Duke Skule was defeated in 1240, bringing more than 100 years of civil wars to an end.

Nidaros, Niðarós or Niðaróss (Old Norse pronunciation: [ˈniðɑˌroːsː]) was the medieval name of Trondheim when it was the capital of Norway's first Christian kings. It was named for its position at the mouth (Old Norse: óss) of the River Nid (the present-day Nidelva).

Although the capital was later moved to Oslo, Nidaros remained the centre of Norway's spiritual life until the Protestant Reformation. The Archdiocese of Nidaros was separated from Lund (in Scania) by the papal legate Nicholas Breakspeare in 1152, and the shrine to Saint Olaf in Nidaros Cathedral was Northern Europe's most important pilgrimage site during the Middle Ages. Archbishop Olav Engelbrektsson led Norway in its attempted resistance against the Danish Reformation, and was forced into exile by King Christian III in 1537. The archdiocese was abolished and replaced with a Lutheran diocese.