King Juan Carlos of Spain abdicates Published duration 2 June 2014

media caption King Juan Carlos abdicated in June 2014, saying his son Prince Felipe would "open a new era of hope" for Spain

King Juan Carlos of Spain has announced his intention to abdicate, after nearly 40 years on the throne.

"A new generation must be at the forefront... younger people with new energies," the 76-year-old king said in a televised address.

His son, Crown Prince Felipe, 45, will take over the throne.

For much of his reign, Juan Carlos was seen as one of the world's most popular monarchs, but recently many Spaniards have lost confidence in him.

His reputation has been tarnished by a long-running corruption investigation into the business dealings of his daughter and her husband.

media caption King Juan Carlos, 76, has had health problems in recent years

Support for the king fell further when it was discovered he had been on a lavish elephant hunting trip to Botswana in April 2012, in the middle of Spain's financial crisis.

The first announcement about the abdication came from Prime Minister Mariano Rajoy, who told reporters: "His Majesty King Juan Carlos has just informed me of his desire to renounce the throne and begin the process of succession."

Later, the king himself said in a televised address that it was time for a "new era" in which a new generation could take on the transformations and reforms required.

He said his son, Prince Felipe, had the maturity and preparation to be king.

Left-wing groups have called for protests in support of a referendum on the future of the monarchy, with the El Pais newspaper quoting police as saying some 20,000 people have gathered in Madrid's Puerta del Sol square.

Several thousand people were also reported to have gathered in the Barcelona in the Placa Catalunya square, some carrying large Catalan flags.

Analysis: Tom Burridge, BBC Madrid correspondent

image copyright AFP image caption Prince Felipe will take over from his father

King Juan Carlos' abdication will be a surprise to most people in Spain, but not a shock.

At the beginning of this year, before his youngest daughter appeared in court in a major corruption investigation, the Spanish media was awash with speculation about the king's future.

But royal officials had said abdication was not an option and that the king's popularity was improving after a clear decline in the polls. They insisted that his mobility was also getting better, after several operations to his hips.

The royal household has always been keen for any decision over abdication to not come in the wake of intense media pressure. That is because Republicanism is a relatively potent force in Spain.

Royal officials are describing this as a "personal" decision, which the king has been considering ever since his 76th birthday in January.

Spain does not have a precise law regulating abdication and royal succession, and Mr Rajoy said ministers would hold a special meeting to discuss the process by which the prince would take over as Felipe VI.

The prime minister said Juan Carlos had been a "tireless defender of our interests".

"I'm convinced this is the best moment for change," he added.

Pivotal role

Juan Carlos took the throne on the death of General Francisco Franco, the right-wing dictator who ruled for 36 years after his victory over Republican forces in the Spanish Civil War.

The king became Spain's first crowned head of state for 44 years.

But he soon ignored Franco's supporters, who wanted an extension to autocratic rule, and ushered in a new system of parliamentary monarchy.

As the years went on the king involved himself less in day-to-day politics, and became more of a figurehead.

image copyright BBC ( Ignacio de los Reyes) image caption The king said in his announcement that he looked back on his reign with "pride and gratitude"

image copyright AFP image caption Juan Carlos (l) became king two days after the death of General Franco (r)

image copyright AP image caption A legal investigation into Princess Cristina and her husband has tarnished the king's image

image copyright Reuters image caption But Prince Felipe and his wife have seen their popularity rise in recent years

He has been credited as a stabilising force for independence-minded areas such as Catalonia and the Basque region, and he also helped defuse an attempted coup in 1981.

Until a few years ago his popularity was high, but the hunting trip and corruption allegations involving his youngest daughter, Cristina, and her husband Inaki Urdangarin, led to calls for him to step aside.

The king's son and successor, Felipe, appears to have been untarnished by the scandal.

Felipe and his wife - former television presenter Princess Letizia - have recently taken on more important roles in ceremonial events.

Recent European Abdications

June 2014: King Juan Carlos of Spain steps down, saying he is passing the role to a younger, energised generation.

July 2013: Belgian King Albert II abdicates in favour of his son, Philippe, for health reasons.

April 2013: Queen Beatrix of the Netherlands hands the throne to her son Prince Willem-Alexander, saying he is ready to reign and it is time for the throne to be held by "a new generation".

But the BBC's Ignacio del los Reyes, in Spain, says there is still concern over whether the couple will be able to save a damaged institution.

On social networks, people are already asking whether it is time for Spain to become a republic, and some parties are calling for constitutional reform and a popular vote to pave the way for this change.

But the two main parties in parliament remain loyal to the monarchy, our correspondent says.

media caption Madrid resident: "I think it is great, but it should have happened earlier"