John I, Count of Hainaut
John I of Avesnes (1218–1257) was the eldest son of Bouchard IV of Avesnes and Margaret II of Flanders, whose papally dissolved marriage left him considered illegitimate until Frederick II recognised his legitimacy. When Margaret inherited Flanders and Hainaut in 1244 and favoured her Dampierre sons, fighting followed; Louis IX's 1246 arbitration awarded John Hainaut, but Margaret refused to surrender it.
He defeated Guy of Dampierre at Walcheren in 1253, taking him prisoner, and secured the county with the backing of William II of Holland. Guy relinquished his claim to Hainaut in 1257. John died at Valenciennes in 1257, leaving the future John II.