Since the death of King John in 1222, Sweden was in a de facto state of civil war until 1248 when Birger Jarl managed to seize power in the kingdom. Unrest was due to the struggle between those who wanted to keep the old tribal structure, the folkung party, and the king, who was assisted by the church. Folkungs, who were mainly from Uppland, heavily resisted the centralization of power, taxation of the Swedes of Uppland,and church privileges. They had temporarily succeeded in deposing the king in 1229, but were forced to give in five years later, but were far from defeated yet. Uppland remained largely independent of the king, and its northern areas continued to be in folkung hands. An uneasy truce continued until 1247, when the folkung rebellion was put to an end at the Battle of Sparrsätra and its leader beheaded a year later.