Brandenburg-Prussia Catholic armies swept the land back and forth, killing, burning, seizing men and taking the food supplies. Upwards of half the population was killed or dislocated. Berlin and the other major cities were in ruins, and recovery took decades. By the Peace of Westphalia, which ended the Thirty Years' War in 1648, Brandenburg gained Minden and Halberstadt, also the succession in Farther Pomerania (incorporated in 1653) and the Duchy of Magdeburg (incorporated in 1680). With the Treaty of Bromberg (1657), concluded during the Second Northern War, the electors were freed of Polish vassalage for the Duchy of Prussia and gained
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