New laws needed to allow Spain's King Juan Carlos to abdicate in favour of his son have been set in train by the Spanish parliament.
The country is due to have his son, Crown Prince Felipe, crowned as King on the throne within three weeks.
But with slipping ratings and a corruption scandal stubbornly swirling around the family, the esteem of the monarch is being eroded fast, as Correspondent Dan Rivers reports.
Spain's King Juan Carlos I has attended a public ceremony a day after the monarch announced he would abdicate in favour of his son Prince Felipe.
Both standing in military uniform and preceding over the event, they watched soldiers and band members march past the royal box.
Anti-monarchist demonstrations have sprung up across Spain in the wake of King Juan Carlos I's abdication announcement.
Juan Carlos has been on the throne for 39 years and was a hero to many for shepherding Spain's democratic and economic transformation.
However, his popularity big blow following royal scandals, including a 2012 elephant-shooting trip he took at the height of Spain's financial crisis during which he broke his right hip and had to be flown from Botswana to Spain aboard a private jet for medical treatment.
Spain's King Juan Carlos said he is abdicating to "ensure stability" in the country.
In a televised statement, he said: "My son [Crown Prince] Felipe, who is the heir to the throne, is the incarnation of stability.
"When I turned 76 in January, I decided it was the moment to prepare passing the baton to someone who can ensure stability".
He ended the broadcast with the words: "I will always hold Spain in the depths of my heart".
King Juan Carlos, who has abdicated from the Spanish throne, has been "a great friend of the United Kingdom" and did "so much during his reign to help Spain's successful transition to democracy", David Cameron said.
King Juan Carlos has decided to abdicate from the Spanish throne for political reasons, rather than as a result of declining health, according to sources close to the Spanish royal family.
The monarch reportedly decided in January that he would pass on the crown to his son, Felipe, but delayed the announcement until the conclusion of the European Parliament elections.
The Twitter account of Spain's royal family has published photos of King Juan Carlos I offering his letter of abdication to the country's Prime Minister, Mariano Rajoy.
Juan Carlos, who has been on the throne almost 40 years, will be replaced by his son, Crown Prince Felipe.
Spain's Prime Minister, Mariano Rajoy, has said now is "the best moment for change", following the decision of King Juan Carlos I to hand over the throne to his son, Crown Prince Felipe.
Addressing reporters this morning, Mr Rajoy said: "His majesty, King Juan Carlos, has just communicated to me his will to give up the throne. I'm convinced this is the best moment for change."
Mr Rajoy said the surprise decision was due to personal reasons.
Crown Prince Felipe, 46, will take over the Spanish throne following the abdication of his father, Juan Carlos I.
Spain's Prime Minister, Mariano Rajoy, said a new constitutional amendment would be proposed to allow Juan Carlos to abdicate.