In a way, the state of Europe in the 17th century is reminiscent of the state of of the Middle East today. Within the larger states there were numerous semi-autonomous republics — Germany alone was 225 of them — each dominated by a religious group. In Germany it was either Lutheran or Catholic (in the modern Middle East it would be Shiite and Sunni). Lutherans fought Catholics, and then a third religion, Calvinism came on the scene to complicate matters further. Their conflicts with one another brought involved sympathetic foreign states — ostensibly for religious solidarity, but just as often for territorial control. The resulting mess broke out in the separate Thirty Years War and Eighty Years War which ravaged the continent.
On this ady, October 24, in 1648 the Treaties of Muenster and Osnabrueck, collectively known as the Peace of Westphalia, restored order to Europe. Among its main outcomes was the instituting of religious freedom.
The treaty curbed the power of the Holy Roman Empire, allowing for each state to make the own decision on which religion they should follow. At the same time, steps were taken to ensure that no matter which religion — Catholic, Protestant, or Calvinist (which was now given legal recognition) — individuals chose to practice, they would be protected from oppression by the state.