This decisive victory turned the tide of the war. The death of Erling removed Sverre's greatest opponent. King Magnus was no match for the priest-king, and the rebel force grew until the contest assumed the shape of civil war. Sverre no longer led a band of wanderers, but was the leader of an army.

This was not the ordinary army recruited from the settled classes of society, but an army made up of the lower stratum of the people, now first demanding their share of the good things of life. Fierce and unruly as they were, Sverre knew how to control and discipline them. He kept his promise, as far as was possible, to reward his men with the honors of those they had slain, but charged them with the maintenance of law and order, punishing all who disobeyed his commands. This he could safely do, for they worshipped him. They had shared peril and suffering together, had lived as comrades, but through it all he had kept his authority intact and demanded obedience. Birchlegs they still called themselves, for they had grown proud of the title, and they named their opponents Heklungs, from the story that some of them had robbed a beggar woman whose money was wrapped in a cloak (hekl).

For six years afterwards the war for dominion in Norway continued, the star of King Sverre steadily rising. In 1180 Magnus attacked his opponent with an army much larger than that of Sverre, but was utterly routed; and an army of peasants that came on afterwards, to kill the "devil's priest," met with the same ill success.

Magnus now took refuge in Denmark, abandoning Norway to his rival, and from there he came year after year to continue the contest. In a naval battle in 1181, in which Sverre had less than half the number of ships of his opponent, his star seemed likely to set. The Birchlegs were not good at sea fighting and the Heklungs were pressing them steadily back, when Sverre sprang into the hottest of the fight, without a shield and with darts and javelins hurtling around him, and in stirring tones sang the Latin hymn, "Alma chorus domini."

This hymn seemed to turn the tide of victory. Magnus, storming furiously forward at that moment, was wounded in the wrist as he was boarding a hostile ship. The pain caused him to pause and, his feet slipping on the blood-stained deck, he fell headlong backward, a glad shout of victory coming from the Birchlegs who saw him fall.

Orm, one of King Magnus's captains, demanded what had happened.

"The king is killed," he was told.

"Then the fate of the realm is decided," he cried.

Cutting the ropes that held the ships together, he took to flight, followed by others and breaking the line of battle. Leaping to his feet, Magnus called out that he was not hurt and implored them not to flee from certain victory. But the terror and confusion were too great, and Sverre took quick advantage of the opportunity, capturing a number of ships and putting the others to flight.

The final battle in this contest for a throne came in 1184. It was one in which Sverre was in imminent danger of a fatal end to his career. Usually not easily surprised, he was now taken unawares. He had sailed up the Nore fiord with a few ships and a small force of men, to punish some parties who had killed his prefect. Magnus, afloat with twenty-six ships and over three thousand men, learned of this and pursued his enemy into the fiord.