William an important supporter. In 1071 William defeated the last rebellion of the north. Earl Edwin was betrayed by his own men and killed, while William built a causeway to subdue the Isle of Ely, where Hereward the Wake and Morcar were hiding. Hereward escaped, but Morcar was captured, deprived of his earldom, and imprisoned. In 1072 William invaded Scotland, defeating Malcolm, who had recently invaded the north of England. William and Malcolm agreed to peace by signing the Treaty of Abernethy, and Malcolm probably gave up his son Duncan as a hostage for the peace. Perhaps another stipulation of the treaty was the expulsion of Edgar the Ætheling from Malcolm's court. William then turned his attention to the continent, returning to Normandy in early 1073 to deal with the invasion of Maine by Fulk le Rechin, the Count of Anjou. With a swift campaign, William seized Le Mans from Fulk's forces, completing the campaign by 30 March 1073. This made William's power more secure in northern France, but the new count of Flanders accepted Edgar the Ætheling into his court. Robert also married his half-sister Bertha to King Philip I of France, who was opposed to Norman power. William returned to England to release his army from service in 1073 but quickly returned to Normandy, where he spent all of 1074. He left England in the hands of his supporters, including Richard fitzGilbert and William de Warenne, as well as Lanfranc. William's ability to leave England for an entire year was a sign that he felt that his control of the kingdom was secure. While William was in Normandy, Edgar the Ætheling returned to Scotland from Flanders. The French king, seeking a focus for those opposed to William's power, then proposed that Edgar be given the castle of Montreuil-sur-Mer on the Channel, which would have given Edgar a strategic advantage against William. However, Edgar was forced to submit to William shortly thereafter, and he returned to William's court. Philip, although thwarted in this attempt, turned his attentions to Brittany, leading to a revolt in 1075. Revolt of the Earls In 1075, during William's absence, Ralph de Gael, the Earl of Norfolk, and Roger de Breteuil, the Earl of Hereford, conspired to overthrow William in the "Revolt of the Earls". Ralph was at least part Breton and had spent most of his life prior to 1066 in Brittany, where he