War of the Flemish Succession

The contested division of the rights to Margaret's inheritance between the sons of Avesnes and those of Dampierre were the cause of the conflicts known as the "war of the succession of Flanders and Hainault."

Louis gave Hainault (technically not his to give) to John I of Avesnes and Flanders (indeed his vassal) to William of Dampierre.

John I of Avesnes quickly comprehended that his mother did not intend to give him the government of Hainault as she had that of Flanders to her other sons.

John I of Avesnes persuaded the German anti-king William of Holland to seize Hainault and Flemish territory within the empire.

The fighting continued until the Battle of West-Capelle on 4 July 1253, when John I of Avesnes gained a brilliant victory over Guy of Dampierre and forced him and his mother to respect the division of Louis and grant him Hainault.