Madrid: Spain's new king, Felipe VI, will be be sworn in on Thursday, after a teary-eyed King Juan Carlos sealed his abdication of the crown following a four-decade reign.
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 on Wednesday, then hugged his son.
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.
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, 46, his wife and future queen Letizia and Juan Carlos' 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.
Letizia, 41, is a former television news presenter and the granddaughter of a taxi driver. The couple have two daughters: seven-year-old Sofia and eight-year-old Leonor, who is the youngest heiress to the throne in Europe.
Juan Carlos is credited with helping guide Spain to democracy after the death of dictator Francisco Franco, but his popularity was damaged by scandals in recent years.
Thousands of red and yellow Spanish flags fluttered through Madrid, bedecked with white flowers to hail the soon-to-be Felipe VI. Shops scrambled to sell T-shirts and fridge magnets commemorating the new generation of royals.
The new king is to be proclaimed after swearing to uphold the constitution and delivering a speech to parliament.
He and Letizia will then be driven through Madrid's streets and appear before the crowds on the front balcony of the Royal Palace, alongside his parents.
As king, Felipe faces a formidable challenge. He must restore the image of the monarchy after his father's reign became bogged down in scandal; inspire a people grappling with a 26 per cent unemployment rate; and try to unite the nation even as the north-eastern region of Catalonia seeks an independence referendum on November 9.
In keeping with Spain's tough economic times, festivities remain restrained when compared with other European royal coronations, however, and no foreign dignitaries have been invited.