1653 Imperial election electoral rights in a treaty of 1619, confirmed at the Diet of Regensburg on February 25, 1623. The revolt ignited a broader religious war across Germany, the Thirty Years' War, which would involve not only the states of the empire but also Sweden, the Dutch Republic, France, Denmark–Norway, England, Scotland, Spain and Hungary and which would kill some eight million people before its end. The Peace of Westphalia which ended the war in 1648 revived the principle of "cuius regio, eius religio" established in 1555 by the Peace of Augsburg and established the modern concept of Westphalian sovereignty. It additionally
Treaty of Teschen margraviates in 1791. The Electorate of Saxony received a sum of six million guilders (florins) from Bavaria in exchange of its inheritance claims. With the accession of Elector Charles Theodore, the electorates of Bavaria and the County Palatine of the Rhine (i.e. the territories in the Rhenish Palatinate and the Upper Palatinate) were under the united rule of the House of Wittelsbach. Their electoral votes were combined into one per a provision in the earlier Treaty of Westphalia in 1648, thereby reducing the number of electorates in the Holy Roman Empire to eight. The Innviertel, except for a short time