Prince Felipe will face a daunting array of challenges when he becomes king of Spain at midnight on Wednesday 18 June.
Some are the consequence of the severe economic crisis endured over the past six years, which has resulted in extreme social hardship and growing inequality.
As his father, Juan Carlos, admitted in his abdication speech, the crisis – from which Spain is only now slowly emerging – has inflicted very deep scars, which will not heal overnight.
The future king’s most important task will therefore be to assist Spanish society in overcoming this painful legacy.
The crisis has also fuelled public disaffection with Spain’s major institutions, which have come under unprecedented scrutiny and criticism, and many fear that economic recovery alone will not be enough to restore public trust.
Juan Carlos himself has acknowledged as much by stating that his abdication was meant to pave the way for the “transformations” and “reforms” that current circumstances demand.
Like his father, the future king will have very limited political powers, and the regeneration of the Spanish body politic will therefore depend largely on the major political actors.
However, the 1978 constitution states that the monarch “arbitrates and moderates the regular functioning of the institutions”, which should allow him to urge political leaders to set aside their differences and seek creative answers to apparently intractable problems.
The future king lacks a political mandate for change, of course, and cannot undermine or second-guess Spain’s democratically elected government, but he will want to exercise his right to be consulted, to encourage, and to warn.
The most serious political challenge facing the new king will be that posed by the Catalan government’s decision to hold a referendum on independence on 9 November 2014, which both the central government and the constitutional court deem illegal.
The future king – who speaks Catalan and knows the region well – may be able to play a discreet role in helping political leaders find a constructive way out of a crisis that has been allowed to fester for too long.
The crisis could lead to an unprecedented institutional crisis should the Catalan authorities attempt a unilateral declaration of independence.
Fresh efforts to accommodate Catalan and other nationalists within the Spanish state are expected, and may well require a substantial constitutional reform.
Juan Carlos was one of the founding fathers of the current political system, and is closely identified with the 1978 constitution; his son will be unencumbered by this historical baggage, and may therefore feel freer to contribute to a new constitutional settlement.
In the short term, however, the new king’s most pressing task will be to reform the role, style and tone of the monarchy itself.
The institution’s prestige has been severely damaged by the investigation currently under way into the financial activities of Felipe’s brother-in-law, Inaki Urdangarin, which has forced the prince to have very limited contact with his sister Cristina.
The investigation itself proves that nobody is above the law in Spain, and it is unlikely that it will do the monarchy further damage in future, though it may continue to strain personal relations within the royal family.
More importantly, this scandal has brought home the importance of ensuring that the royal household operates in a more transparent and accountable manner than has been the case to date.
An opinion poll carried out by the Elcano Royal Institute reveals that Spaniards expect the monarchy to be more accessible under the new king, and would also like it to be more austere, even though the royal household’s annual budget of 7.7m euros (£6.2m) in 2014 is quite modest by comparison with others.
Above all, Felipe VI will need to reach out to sectors of Spanish society that feel increasingly indifferent or hostile to the monarchy.
Much can be done to bring the institution closer to foreign-born Spaniards, for example, who account for one-tenth of the population.
Negative attitudes are strongest amongst younger, better educated and left-leaning Spaniards, but on the whole, even they view Prince Felipe favourably.
The future king may be less warm and spontaneous than his father, but he is hard-working and disciplined, and will also be the first Spanish monarch with a university education.
In the current climate, these attributes will surely stand him in good stead in the eyes of most of his fellow countrymen.