Charles VII was the prince-elector of Bavaria from 1726 and Holy Roman Emperor from 24 January 1742 to his death. He was a member of the House of Wittelsbach, and his reign as Holy Roman Emperor thus marked the end of three centuries of uninterrupted Habsburg imperial rule although he was related to the Habsburgs by both blood and marriage. After the death of emperor Charles VI in 1740, he claimed the Archduchy of Austria by his marriage to Maria Amalia of Austria, the niece of Charles VI, and was briefly, from 1741 to 1743, as Charles III King of Bohemia. In 1742, he was elected emperor of the Holy Roman Empire as Charles VII and ruled until his death three years later.