The Thirty Years' War was a series of political and religious wars that lasted from 1618 until 1648. They were mainly caused by the political rivalry between Catholic and Protestant princes in Germany, and the interest of foreign powers in German affairs.
The main phases of the war were:
The Thirty Years War, which devastated Germany and increased French power at the expense of Spain, was ended by the Treaty of Westphalia in 1648, which was signed by the Holy Roman Empire, France, Sweden, and the Protestant states of the Empire.
The Holy Roman Empire was greatly weakened by the recognition of the German states. The German population was cut from 20,000,000 to 13,500,000 people, numerous German cities were devastated, and German industry and commerce took over a century to regain their 16th century level. The middle class declined and the towns were ruled by territorial princes, or their appointees, rather than by businessmen and merchants. The German princes became collectively stronger than the emperor and they had their own armies, courts, and coinage. Moreover, the German princes determined their own foreign policies and formed their own alliances with non-German states, even against imperial interest. At this point, there were over two hundred German principalities that enjoyed such independence.
The French, who gained Alsace after the Thirty Years' War, rejoiced at the fragmentation of Germany and it emerged as the dominant power in Europe. French power in Europe flowered and was maintained until after the Congress Of Vienna which ended the Napoleonic Wars.
Although Austria did not suffer in the Thirty Years' War as severely as Germany, its treasury was depleted, its armies were exhausted by the conclusion of the Treaty of Westphalia. The Treaty had also lowered the prestige and power of the Austrian emperors.
Furthermore, from the Treaty of Westphalia, Sweden gained the western part of Pomerania. Switzerland and the United Netherlands were recognized as independent nations. The Treaty of Westphalia ended the reign of theology over the European mind, and marked the opening of a new age in Europe--the Age of Reason.