MADRID (AFP) - A teary-eyed King Juan Carlos sealed his abdication of the Spanish crown on Wednesday after a four-decade reign, clearing the throne for his 46-year-old son, Felipe VI.
The 76-year-old monarch signed the act of parliament ending his reign with a golden pen at a ceremony in Madrid's Royal Palace, then hugged his son, who will be sworn in on Thursday morning.
The embrace between the elderly king and his heir under the palace's chandeliers marked the first royal succession in Spain's post-Franco history.
Dressed in a dark blue suit and pink tie, Juan Carlos, who uses a cane following repeated hip operations, stood unaided during part of the ceremony but had to briefly hold Felipe's arm to steady himself.
A band struck up the national anthem as Felipe in a dark suit, his wife and future queen Letizia in a black top and white skirt, and Juan Carlos's wife Queen Sofia, applauded the abdicating king.
Minutes earlier, cannons had fired a salute and shouts of "Long Live the King!" rang out as the royals arrived by car at the old palace in western Madrid.
Juan Carlos is credited with helping guide Spain to democracy after the death of the dictator Francisco Franco, but his popularity was damaged by scandals in recent years.
Madrid was bedecked with flags to hail the soon-to-be Felipe VI.
Red and white flowers - nearly 16,000 blooms, according to the City Hall - adorned the streets. Workers hoisted a great red canopy with the state coat of arms embroidered in gold over the front doors of the lower house of parliament in central Madrid.
Felipe will pass through them, dressed in a blue military uniform with the red silk sash of the forces' commander in chief, to be sworn in by the parliament on Thursday morning. "There's a festive atmosphere. It's a party for this new king," said one passerby, Carlos Tesorero.
"All the Spanish people have faith in him. He is very capable and I think he will be a good king." The red-and-yellow Spanish flag fluttered from balconies across Madrid and two giant flags hung down the facade of the city hall.
"It looks more like a football match. Lots of flags. Too much, perhaps," said Jose Manuel Garrucho, a 20-year-old student, outside the parliament.
By coincidence, Wednesday was also a big night for Spain's national football team, with a crucial World Cup tie against Chile.