# Margaret II, Countess of Hainaut

Margaret II of Avesnes (1311 – 23 June 1356) was Countess of Hainaut and Countess of Holland (as Margaret I) from 1345 to 1356. She was Holy Roman Empress and Queen of Germany by marriage to Holy Roman Emperor Louis IV the Bavarian.

## Life

Margaret was the daughter of William I, Count of Hainaut, and Joan of Valois, the daughter of Charles, Count of Valois, who was the third son of King Philip III of France. She spent her childhood in Hainaut (also known as Hainault or Henegouwen) and also frequently visited France with her French mother.
On 26 February 1324, in Cologne, she married Louis of Bavaria, thereby becoming Queen of Germany. On 17 January 1328, she was crowned Holy Roman Empress alongside her spouse in Rome.

### First reign

In 1345 she succeeded her brother William II, Count of Hainaut and Holland (as William IV, Count of Holland) following his death in battle with her husband Louis IV the Bavarian, Holy Roman Emperor who designated that the counties of Hainaut, Holland, Zeeland and Friesland were his wife's possessions. Emperor Louis IV gave his support to his wife Margaret because he was reportedly worried that the domains of her late brother would otherwise be lost to the empire. Due to the dangerous hostility of the House of Luxemburg, Louis increased his power base ruthlessly.
Margaret traveled to Hainaut and was recognized there in her new position as ruler, and on 26 March, she left Hainaut to visit her Northern domains of Holland and Zeeland. There were different difficulties in securing the position of Margaret in her three domains. In Holland and Zeeland, there were doubts as to whether female succession was legal, and while her gender was not a problem in Hainaut, there where still the question of her sister's claims upon the domain. Margaret granted the cities and citizens in Holland and Zeeland several economic privileges to secure her position. The claims of her sisters were also addressed.
A parchment dated 7 September 1346 in Frankfurt, of which the seal is destroyed, announces that Louis IV of Bavaria, Emperor of the Holy Germanic Empire bestows for himself and his heirs, in the name of his spouse, the empress Margaret, to never cede, divide or bestow the counties of Hainaut, Holland, Zeeland and the palatine of Frisia, which belong to his wife Margaret II (of Avesnes), Countess of Hainaut and to her heirs, excepting the rights of her sisters and after her death, to be passed to their second son William I, Duke of Bavaria (future William III, Count of Hainaut) Duke (I) of Bavaria, and after his decease to Albert (future Albert I, Count of Hainaut). Margaret's sisters, including Philippa of Hainault who was Queen consort of King Edward III of England, disavowed their hereditary claims.
Margaret ruled her three domains directly for seven months, after which she was called back to Germany by her spouse, and then appointed her son William to rule in her absence.
When Louis IV died on 11 October 1347, he was succeeded by his six sons, and in connection to this, Margaret resigned her sovereignty in favor of her son William in exchange for an allowance. In 1349 Louis IV's sons decided to partition their possessions: Louis V, Duke of Bavaria kept Brandenburg and Tyrol, his younger brothers Louis VI the Roman and Otto V the Bavarian received Upper Bavaria. While Stephen II, William I and Albert I received Lower Bavaria, Holland and Hainaut. Louis V and Stephen were the stepsons of Margaret from her husband's first wife, and her youngest sons Albert and Otto were still minors. Her eldest son Louis VI released Holland and Hainaut for his brothers William and Albert in 1349 since he expected the Polish crown by his marriage with Cunigunde of Poland. In 1353 her son Stephen also released Holland and Hainaut to his brother William.

### The Hook and Cod wars

However, a conflict soon arose between Margaret and her son William, as he refused to honor the terms in her abdication document by withholding the allowance she had demanded in turn for abdicating in his favor. Willem's opposition among the nobles of Holland asked Margaret to return to run Holland again, and in March 1350, Margaret had returned to Hainaut, where she retracted her abdication in 1 June. The Cod League was formed on 23 May 1350 by a number of supporters of William, and on 5 September of the same year, the Hook League was formed in support of Margaret. Soon afterward these factions clashed and a civil war began, known as the Hook and Cod wars.
Margaret and the war between mother and son was controversial, and her right to Holland was always considered to be of dubious legality, as this domain was at that time regarded as reserved for men, though the same thing was not raised when it came to her right to Hainaut.
After the destruction of several strongholds of Margaret and a defeat of her forces at two sea battles in 1351, Edward III of England, Margaret's brother-in-law through her sister Philippa of Hainault, came to her aid, winning a naval engagement off Veere in 1351; a few weeks later the Hooks and their English allies were defeated by William and the Cods at Vlaardingen, a defeat which ruined Margaret's cause. Edward III shortly afterwards changed sides and in 1354, Margaret saw herself compelled to come to an understanding with her son: he being recognized as count of Holland and Zeeland, and she being secured as ruling countess of Hainaut in her lifetime.
Margaret ruled Hainaut for two more years, and died at Le Quesnoy Castle of infectious tuberculosis 23 June 1356, leaving William in possession of the entire Holland-Hainaut inheritance. She was buried in the Minderbroeders Abbey in Valenciennes.

## Issue

In 1324 Margaret married Louis IV, Holy Roman Emperor. Their children were:
* Margaret of Bavaria, Duchess of Slavonia (1325–1374), married:
** in 1351 in Buda Stephen, Duke of Slavonia (d. 1354), son of the King Charles I of Hungary, and had issue.
** 1357/58 Gerlach von Hohenlohe.
* Anna of Bavaria, Duchess of Lower Bavaria (c. 1326 – 3 June 1361, Fontenelles), married John I, Duke of Lower Bavaria, who died young (d. 1340), they had no issue.
* Louis VI the Roman (1328–1365), was Duke of Upper Bavaria and Prince-Elector of Brandenburg. Married twice with no issue.
* Elisabeth of Bavaria, Countess of Württemberg (1329 – 2 August 1402, Stuttgart), married:
** Cangrande II della Scala, Lord of Verona (d. 1359) in Verona on 22 November 1350. No issue
** Count Ulrich of Württemberg (d. 1388) in 1362. Parents of Eberhard III of Württemberg 1364-1417.
* William of Bavaria (1330–1389), as 'William I' Duke of Lower Bavaria, as 'Wiliam V' Count of Hainaut and Holland. He married Maud of Lancaster but their only daughter died young. Mentally ill from 1358 and locked up for the remainder of his life.
* Agnes of Bavaria (Munich, 1335 – 11 November 1352, Munich). She became a nun, due to ill health and died young
* Albert of Bavaria (1336–1404), was Duke of Lower Bavaria as well as Count of Hainaut and Holland from 1358.
* Otto of Bavaria (1340–1379), was Duke of Upper Bavaria and Elector of Brandenburg.
* Beatrix of Bavaria (c. 1344–1359), Swedish Queen consort of king Erik Magnusson
* Louis (October 1347 – 1348)