The term Peace of Westphalia refers to the two peace treaties of Osnabrück and Münster, signed on May 15 and October 24 of 1648 respectively, which ended both the Thirty Years’ War in Germany and the Eighty Years’ War between Spain and the Netherlands. The treaties involved the Holy Roman Emperor, Ferdinand III (Habsburg), the Kingdoms of Spain, France and Sweden, the Dutch Republic and their respective allies among the princes of the Holy Roman Empire.
The Peace of Westphalia resulted from the first modern diplomatic congress and initiated a new order in central Europe based on the concept of state sovereignty. Until 1806, the regulations became part of the constitutional laws of the Holy Roman Empire. The Treaty of the Pyrenees, signed in 1659, ended the war between France and Spain and is often considered part of the overall accord.
Internal political boundaries
The power taken by Ferdinand III in contravention of the Holy Roman Empire’s constitution was stripped and returned to the rulers of the German states. This rectification allowed the rulers of the German states to independently decide their religious worship. Protestants and Catholics were redefined as equal before the law, and Calvinism was given legal recognition.  
The main tenets of the Peace of Westphalia were:
- All parties would now recognize the Peace of Augsburg of 1555, by which each prince would have the right to determine the religion of his own state, the options being Catholicism, Lutheranism, and now Calvinism (the principle of cuius regio, eius religio).  
- Christians living in principalities where their denomination was not the established church were guaranteed the right to practice their faith in public during allotted hours and in private at their will. 
There were also territorial adjustments:
- The independence of the Dutch Republic, Switzerland, Savoy, Milan, Genoa, Mantua, Tuscany, Lucca, Modena and Parma from the Empire was formally recognised, as these regions had been de facto independent of the Emperors since the late 15th century.
- The majority of the Peace’s terms can be attributed to the work of Cardinal Mazarin, the de facto leader of France at the time (the King, Louis XIV, was still a child). Not surprisingly, France came out of the war in a far better position than any of the other participants. France won control of the Bishoprics of Metz, Toul and Verdun near Lorraine, and the cities of the Décapole in Alsace (but not Strasbourg, the Bishopric of Strasbourg, or Mülhausen).
- Sweden received an indemnity, as well as control of Western Pomerania and the Prince-Bishoprics of Bremen and Verden. It thus won control of the mouth of the Oder, Elbe, and Weser Rivers, and acquired three voices in the Council of Princes of the German Reichstag.
- Bavaria retained the Palatinate‘s vote in the Imperial Council of Electors (which elected the Holy Roman Emperor), which it had been granted by the ban on the Elector Palatine Frederick V in 1623. The Prince Palatine, Frederick’s son, was given a new, eighth electoral vote.
- The Palatinate was divided between the re-established Elector Palatine Charles Louis (son and heir of Frederick V) and Elector-Duke Maximilian of Bavaria, and thus between the Protestants and Catholics. Charles Louis obtained the Lower Palatinate, along the Rhine, while Maximilian kept the Upper Palatinate, to the north of Bavaria.
- Brandenburg-Prussia (later Prussia) received Farther Pomerania, and the Bishoprics of Magdeburg, Halberstadt, Kammin, and Minden.
- The succession to the Dukes of Jülich-Cleves-Berg, who had died out in 1609, was clarified. Jülich, Berg, and Ravenstein were given to the Count Palatine of Neuburg, while Cleves, Mark, and Ravensberg went to Brandenburg.
- It was agreed that the Prince-Bishopric of Osnabrück would alternate between Protestant and Catholic holders, with the Protestant bishops chosen from cadets of the House of Brunswick-Lüneburg.
- The independence of the city of Bremen was clarified.
- Barriers to trade and commerce erected during the war were abolished, and ‘a degree’ of free navigation was guaranteed on the Rhine.