Duke Wilhelm in Bavaria

Duke Wilhelm in Bavaria, full German name: Wilhelm, Herzog in Bayern (born 10 November 1752 in Gelnhausen, Palatinate-Birkenfeld-Gelnhausen;  died 8 January 1837 in Landshut or Bamberg, Kingdom of Bavaria  ) was Count Palatine of Birkenfeld-Gelnhausen between 1789 and 1799 and first Duke in Bavaria from 16 February 1799 until his death in 1837. From 17 December 1803 to 20 March 1806, Wilhelm was titled Duke of Berg.

Early life
Wilhelm was born on 10 November 1752 in Gelnhausen to John, Count Palatine of Gelnhausen and his wife Wild- and Rhinegravine Sophie Charlotte of Salm-Dhaun. In 1778, Wilhelm became an honorary member of the Bavarian Academy of Sciences and Humanities.

Marriage and issue
Wilhelm married Countess Palatine Maria Anna of Zweibrücken-Birkenfeld, sister of the first King of Bavaria Maximilian I, daughter of Frederick Michael, Count Palatine of Zweibrücken and his wife Countess Palatine Maria Franziska of Sulzbach, on 30 January 1780 in Mannheim. Wilhelm and Maria Anna had two children:


 * unnamed son (6 May 1782)
 * Duchess Maria Elisabeth Amalie Franziska in Bavaria (5 May 1784 – 1 June 1849) married the French Marshall Louis Alexandre Berthier, 1st Prince de Wagram and had issue.
 * Duke Pius August in Bavaria (1 August 1786 – 3 August 1837)

Duke in Bavaria
On 16 February 1799, the head of the House of Wittelsbach Charles Theodore, Elector of Bavaria died. At the time there were two surviving branches of the Wittelsbach family: Zweibrücken (headed by Duke Maximilian Joseph) and Birkenfeld (headed by Count Palatine Wilhelm). Maximilian Joseph inherited Charles Theodor's title of Elector of Bavaria, while Wilhelm was compensated with the title of Duke in Bavaria. The form Duke in Bavaria was selected because in 1506 primogeniture had been established in the House of Wittelsbach resulting in there being only one Duke of Bavaria at any given time.

Death
Wilhelm was interred at the family burial crypt of the Dukes in Bavaria at Tegernsee Abbey.