Strengthened by this alliance with Flanders, William showed himself more than a match for all his enemies. Henry, who had hitherto been for the most part friendly, now turned against him. After the suppression of some isolated revolts, William was threatened in 1054 by a great confederacy. His dominions were invaded by the forces of the French king, in combination with those of Geoffrey of Anjou, Theobald of Blois, and others. William remained at first on the defensive; then, falling suddenly on one of the French armies at Mortemer, in the north-eastern corner of his duchy, he cut it to pieces. This blow put an end to the war; Henry made peace (1055), and William took the opportunity of extending his dominions in a southerly direction. He built fresh fortresses and exacted homage from Count Geoffrey of Mayenne.
In 1058 Henry and Count Geoffrey made a final effort to crush their dangerous neighbor; but the effort failed, like those which preceded it. William again allowed the allies to enter and ravage his territory; but, while the French army was crossing the Dive at Varaville, he attacked and completely destroyed their rear-guard, which was cut off from the van by the advancing tide. Henry again made peace, and soon afterward died (1060). The death of Geoffrey of Anjou in the same year relieved William of his most formidable rival for the possession of Maine. Herbert Wake-Dog, the lawful ruler of that territory, who had been dispossessed by Geoffrey, recovered his dominions on the latter's death. He at once "commended" himself to William, thus making the duke his heir. On his death in 1063, William took possession of Le Mans and the county of which it was the capital--an acquisition which extended his southern frontier nearly to the Loire, almost severed Brittany from the rest of France, and paved the way for the subsequent junction with Anjou.
It was apparently soon after this event, in the year 1064, that Harold, then Earl of Wessex, visited Normandy, and, according to legend, was entrapped into an oath to support William as heir to the English throne. When Harold was elected and crowned King of England (1066), William's first step was to send an embassy to him demanding the fulfilment of his promise. The purport of the demand is as uncertain as that of the pledge; but, whatever it was, Harold rejected it. The duke thereupon summoned a council of his supporters, who advised him to call together an assembly representing the whole duchy. This assembly, a typical feudal parliament, met at Lillebonne. While acting together it appears to have opposed the scheme for the conquest of England which William laid before it, but its members were won over singly. He then made a compact with Tostig, the banished brother of Harold; he came to terms with the Emperor Henry; he conciliated Philip, King of France, by offering to hold England as his vassal; and--most important of all--he obtained the sanction of Rome.