 With her second husband, William II of Dampierre (d.1231), she also had three children, including William III and Guy of Dampierre.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.