Baldwin V of Hainaut inherited in 1171 the title of Count of Hainaut in the death of his father, he was nicknamed "The Brave" (he was also later Baldwin VIII of Flanders). The new count, however, preferred to remain in Valenciennes rather than Le Quesnoy. In 1184, the count had to struggle against a coalition from the sire of Avesnes, the Count of Brabant and his brother the Count of Flanders : the Hainaut was ravaged on all sides. Unable to defend Le Quesnoy, the Count of Hainaut, with the consent of the inhabitants, burned the town so the attackers could not occupy it: the Quercitains took refuge in their castle and victoriously resisted the assaults of the Count of Flanders. During the siege, Baldwin V, Count of Hainaut was in Mons, collecting and concentrating his troops. The Count of Flanders then came to the ramparts of Mons to try to take the town: it resisted. It was the same for the town of Maubeuge. Meanwhile, at Le Quesnoy, the Lord of Trazegnies who commanded the garrison made a sortie and surprised the Flemish in their camp at Viesly. Peace between the warring parties finally intervened. Le Quesnoy rose from its ruins and became the favorite residence of the Counts of Hainaut who indulged in hunting and maintained a brilliant court. From 1194, Count Baldwin V settled permanently in Le Quesnoy. That same year, Pierre Pitens, the Count's chaplain, founded a small hospital that was equipped with incomes of land: the hospital will be the source of the Abbey of St. Elizabeth, Le Quesnoy (in rue Achille-Carlier in the town) that occupant came from the Augustinian Abbey Prémy near Cambrai.