The period between 1648 and 1688 was one of acute crisis for Spain: demographic, economic, social, political and spiritual. In 1648 the economic depression of the seventeenth century was in one of its most serious phases, while by 1688 recovery was already perceptible, especially in the eastern parts. This change, which reflected the general European development, operated also in demography, with a rise in population on the coasts, and stability or even decline in the interior. This was also a period during which the outlying areas, especially Catalonia, asserted themselves, and centralising tendencies suffered a setback. When the Catalan rising was put down in 1652, Philip IV (1621–65), instead of imposing the full authority of the absolute monarchy, re-established the special position of Catalonia. This was in accordance with the new legalism which can be noticed in the Spanish State of Philip IV and Charles II (1665–1700) and parallel with the demographic and economic importance of the periphery.
In the international sphere, the Peace of Westphalia marked the collapse of the Spanish plan for a Habsburg hegemony. Spain abdicated her position as a great power and withdrew within herself. She was concerned only with defending her colonies, and especially her own territory, from the imperialism of Louis XIV, while Charles II's lack of an heir drew the covetous eyes of all western Europe towards Spain. This change had a powerful effect on intellectual life, stimulating meditation on the meaning of Spanish history, and rousing controversy between those who welcomed new ideas and those who remained faithful to the spirit of the sixteenth century.