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.
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.
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