Heir to Spain’s throne, Princess Leonor, swore allegiance to the constitution on her 18th birthday on Tuesday as she formally stepped into the spotlight.
She took oath as boycotts by leftist and separatist politicians underlined divisions over the monarchy.
The ceremony in parliament marked her coming of age, meaning she will now directly become queen after her father King Felipe VI, assuming he does not go on to have any male children.
UK’s Prince William and King Felipe are great-great-grandchildren of King George of the Hellenes.
While William also faces multiple challenges as a future king, his Spanish relative came of age at a time when the majority of people have turned against the monarchy.
The princess, who went to school in Wales and started three years of military training in Spain in August, vowed to uphold the law, respect the rights of citizens and regions and be faithful to the king.
Most cabinet ministers and regional leaders looked on as she paraded into parliament and took her oath in a music-filled blaze of pageantry broadcast live on television.
But the acting ministers of equality, social rights and consumer affairs – all three from the left-wing junior coalition partner Unidas Podemos – declined to attend, saying an hereditary and unelected head of state was undemocratic.
Lawmakers from movements calling for the independence of Catalonia, the Basque Country and Galicia also stayed away.
A 2022 poll by Sinaptica found that 51.6% of Spaniards wanted the country to become a republic while 34.6% preferred a monarchy, although another poll a year earlier showed 55.3% supporting the crown.
The state-run Centre for Sociological Studies stopped asking citizens to rate the monarch in 2015, a year after Felipe VI acceded to the throne following the abdication of his scandal-ridden father, Juan Carlos I. Those surveyed then gave Felipe VI an average score of 4.34 out of ten.