The first conflict opened with Margaret's succession in 1244. John I of Avesnes and William of Dampierre, half brothers, fought between themselves until
King Louis IX intervened in 1246. Louis gave Hainault (technically not his to give) to John I of Avesnes and Flanders (indeed his vassal) to William of Dampierre. Margaret, in light of this judgement, gave the government of Flanders over to William of Dampierre in 1247. She did not however relinquish her governance of Hainault to John I of Avesnes. In 1251, William III of Dampierre died and Flanders passed to his brother Guy of Dampierre. ==Second conflict== In 1248, Louis had left on the
Seventh Crusade and remained abroad for six years. 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 revolted against his mother and attacked his half-brother Guy of Dampierre, who had just become count of Flanders. 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. ==Third conflict==