Brandenburg-Prussia is the historiographic denomination for the Early Modern realm of the Brandenburgian Hohenzollerns between 1618 and 1701. Based in the Electorate of Brandenburg, the main branch of the Hohenzollern intermarried with the branch ruling the Duchy of Prussia, and secured succession upon the latter's extinction in the male line in 1618. Another consequence of the intermarriage was the incorporation of the lower Rhenish principalities of Cleves, Mark and Ravensberg after the Treaty of Xanten in 1614. The Thirty Years' War (1618–48) was especially devastating. the Elector changed sides three times, and as a result Protestant and 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 Lauenburg–Bütow and Draheim. The Treaty of Saint-Germain-en-Laye (1679) expanded Brandenburgian Pomerania to the lower Oder.
The second half of the 17th century laid the basis for Prussia to become one of the great players in European politics later on. The emerging Brandenburg-Prussian military potential, based on the introduction of a standing army in 1653, was symbolized by the widely noted victories in Warsaw (1656) and Fehrbellin (1675) and by the Great Sleigh Drive (1678). Brandenburg-Prussia also established a navy and German colonies in the Brandenburger Gold Coast and Arguin. Frederick William, known as "The Great Elector", opened Brandenburg-Prussia to large-scale immigration ("Peuplierung") of mostly Protestant refugees from all across Europe ("Exulanten"), most notably Huguenot immigration following the Edict of Potsdam. Frederick William also started to centralize Brandenburg-Prussia's administration and reduce the influence of the estates.