A man looks at a television showing Spain's King Juan Carlos delivering a statement at a store in Siero, northern Spain, today. The king is abdicating after almost 40 years on the throne and his son Prince Felipe will succeed him, Prime Minister Mariano Rajoy said on Monday in a surprise announcement.

The king said he is abdicating to let a new generation take over. His son, the very popular Felipe, will be crowned by the end of month, after a complex series of protocols and bureaucratic processes. “My son Felipe, heir to the crown, embodies stability,” he said.

After the death of Gen. Francisco Franco in 1975, the king was the personal guarantor of democracy in Spain, until passing on the torch to political leaders. Juan Carlos congratulated Spain in its “transformation” since the transition into a democracy. His reign is credited for holding Spain together, first in the transition after Franco, who picked him as his successor, and then in 1981 in a failed coup attempt when the king ordered coup leaders to surrender in a televised address.

A troubled crown

In his address to the country, the king said that “I can only but feel pride and gratitude towards you,” but he acknowledged it was time to step aside. “A new generation justifiably demands a protagonist role” to manage the “profound economic crisis” and the “serious scars” it has left.

Indeed, for over a year, the king’s health has been an issue, after repeated minor surgeries and limited public appearances that raised questions about whether it was time to allow Felipe to take over. Opinion polls also tracked a slow erosion of the once unquestionable loyalty to the crown.

Anti-monarchists have grown more outspoken, in a few instances heckling Juan Carlos and the royal family in public, especially in pro-independence regions like Catalonia and Basque Country, which would have been unthinkable a few years back for the once venerated king.

The approval ratings of the crown are a fraction of what they were in the 1990s, due in large part to the corruption scandal involving the king’s daughter and son-in-law. The crown's lavish spending amid unprecedented economic pain also undermined his popularity.

But in popular culture, nobody dared wager on the king’s abdication, who is believed to have said he would die with the crown on.

The monarchy emphasized the king’s decision was personal, not motivated by any political or economic juncture. Juan Carlos also said his decision was motivated by Spain’s best interest, and that it only comes after having completely recovered from health concerns.

Indeed, the succession appears to have been in fact delayed until both the king and Spain were doing better. Addressing shocked Spaniards, who last witnessed an abdication in 1931, the king said he decided after his 76th birthday, Jan. 6, to abdicate. In February, he told his family, and in March, the government and political leaders, but the exact timing was a personal decision.

The government will hold an extraordinary cabinet meeting Tuesday to prepare the groundwork for parliamentary and institutional procedures. But the king and his heir will carry on their agenda as normal in coming days. On Wednesday, Felipe is expected to make his first public statements since the announcement of the abdication.