Magnus IV was the illegitimate son of Sigurd I of Hordaland and ruled Hordaland during the 1130s. His illegitimacy would cause convulsions in Hordaland as there were no shortages of claimants willing to challenge his right to rule.
Chief among them was Harald Gille, an apparent son of Magnus III Barefoot and therefore Magnus' uncle. The two men would spend much of Magnus' reign at war. Magnus scored an early victory at Brattøra giving him some breathing space but seemed to have picked the wrong side in the ongoing Danish succession crisis (siding with Cnut Lavard) and Harald soon was back with Bjorn I's assistance.
Desperate to gain allies elsewhere Magnus married Ingerd, daughter of Niels I of Viken. As his new brother-in-law Magnus II was obsessed with regaining his Svealandic throne this action only pushed Harald Gille into the pay of Svealand. Twice more he would invade and on the second attempt he was briefly recognised as king by an impromptu thing before being assassinated.
The danger now passed Magnus would a campaign with Magnus II in Gothenland in 1139, a campaign from which he would not return. Following his death Hordaland would be split between Harald Gille's sons Inge, Sigurd and Eystein under the auspices of regents. However their weakness and eventual infighting would allow the Isles to effectively escape Hordaland's grasp.