 After the death of Harthacnut, which had left the Danish throne vacant, Magnus had in addition been selected to be the king of Denmark, and managed to defeat the Danish royal pretender Sweyn Estridsson.Having heard of Sweyn's defeat by Magnus, Harald met up with his fellow exile in Sweden (who was also his nephew), as well as with the Swedish king Anund Jacob, and the three joined forces against Magnus.Their first military exploit consisted of raiding the Danish coast, in an effort to impress the natives by demonstrating that Magnus offered them no protection, and thus leading them to submit to Harald and Sweyn.