 Erling had succeeded in placing his son on the throne after lengthy fighting against several rivals to the throne since the mid 1150s.In 1166, Sigurd Agnhatt and his foster son Olav raised a force in Oppland, and had Olav proclaimed king, while earl Erling was away in Denmark.After Erling returned to Norway to fight this uprising, Olav and his men attacked Erling in an ambush at Rydjokul in Sørum ("Overfallet på Rydjøkul") on 2 February 1167.