The Thirty Years War was a war waged in Central Europe (mainly the Holy Roman Empire) between 1618 and 1648, in which most of the great European powers of the time intervened. This war marked the future of the whole of Europe in later centuries.
The immediate result of the war, and which nevertheless was to last for nearly two centuries, was the consecration of a Germany divided among many territories, all of which, despite their continuity in belonging to the empire until the formal dissolution of this in 1806, they had de facto sovereignty. It has been speculated that this weakness was one of the underlying causes of the later German militarism.
The Thirty Years War restructured the previous power distribution. The decline of Spain became clearly visible. While Spain was occupied with France during the French period, Portugal declared its independence (it had remained under Spanish rule since Felipe II took control of the country after the Portuguese king died without leaving heirs). The Braganza family became the ruling house of Portugal. France was seen from then on as the dominant power in Europe.
During the last years of the Thirty Years War, Sweden was involved in a conflict with Denmark, between 1643 and 1645, called the Torstenson War. The favorable outcome to Sweden of this conflict and the conclusion of the war in Europe through the Peace of Westphalia helped to establish post-war Sweden as a great power in Europe.