John I, Count of Hainaut

John of Avesnes (1 May 1218 – 24 December 1257) was the count of Hainaut from 1246 to his death.

Life
Born in Houffalize, John was the eldest son of Margaret II of Flanders by her first husband, Bouchard IV of Avesnes. As the marriage of Margaret and Bouchard was papally dissolved, he was considered illegitimate.

His mother was remarried to William II of Dampierre and bore more children who could claim her inheritance. Thus, John and his brother Baldwin undertook to receive imperial recognition of their legitimacy and did so from the Emperor Frederick II. On 5 December 1244, Margaret inherited Flanders and Hainaut and designated her eldest son by her second husband, William III of Dampierre, as her heir. Immediately a war, called the War of the Succession of Flanders and Hainault, was set off over the rights of inheritance, pitting John against William.

After two years of fighting, in 1246, Louis IX of France intervened to settle the conflict and granted Hainaut to John and Flanders to William. However, Margaret refused to hand Hainaut over to John. On 6 June 1251, William of Flanders was assassinated and it was shown that the Avesnes family had financed the crime. On 4 July 1253, John defeated the armies of Margaret and her second Dampierre son, Guy, at the Battle of Walcheren. Guy was imprisoned and Margaret agreed to sell her rights to Hainaut to Charles of Anjou if he would reconquer it from John. John's brother-in-law William II, Count of Holland, who had been elected German King (or "King of the Romans"), was convinced to grant Hainaut (an imperial fief) and those Flemish lands within the Empire to John. Charles was defeated and King Louis, returning from the Seventh Crusade, ordered his brother to abide by his arbitration of 1246. On 22 November 1257, Guy finally relinquished Hainaut, but John died on Christmas Eve in Valenciennes.

Family and children
John married Adelaide of Holland in 1246 and had the following issue:
 * John II, Count of Hainaut and Holland (1247–1304)
 * Baldwin (born after 1247, lived in 1299)
 * Joanna, Abbess of Flines (died 1304)
 * Bouchard, Bishop of Metz (1251–1296)
 * Guy, Bishop of Utrecht (1253–1317)
 * William, Bishop of Cambrai (1254–1296)
 * Floris, stadholder of Zeeland and Prince of Achaea