The Wittelsbachs struggled against each other in the so-called Hook and Cod wars which were partly driven by factions in Holland. After the death of Duke William II of Bavaria-Straubing in 1417, Hainaut was inherited by his daughter Jacqueline, who had a powerful opponent in her cousin, Philip the Good.