Spain's Crown Prince Felipe has married ex-TV anchorwoman Letizia Ortiz Rocasolano in a sumptuous ceremony.
The Crown Prince greets his bride as she arrives at the altar
Now Princess Letizia of Asturias, she becomes the first commoner in Spanish history to be in line to be queen.
Driving rain did not deter thousands of well-wishers who lined Madrid's streets decked with flowers and flags.
Nerves are still on edge after the 11 March bombings and security is tight. Around 20,000 police are on patrol and airspace is closed for the ceremony.
Madrid mayor Alberto Ruiz Gallardon said the wedding was "just what Madrid needs following the worst suffering Madrid has experienced in decades".
Almost 200 people died in the co-ordinated bombings in March, which have been blamed on Islamic militants.
More than 1,500 VIPs gathered at the cathedral to watch Ms Ortiz walk up the aisle, accompanied by her father, who is also a journalist.
Ms Ortiz's bridal gown, created by veteran Spanish
designer Manuel Pertegaz, had a tightly fitting bodice with a turned-up collar and a sweeping skirt and train.
Prince Felipe wore a navy blue uniform with braided
epaulets, a light blue sash and medals of honour.
SPANISH ROYAL WEDDING
Letizia Ortiz, 31, divorced and former TV anchorwoman
Crown Prince Felipe, 36, heir to throne
First royal wedding on Spanish soil since 1906
Letizia Ortiz first ever commoner in line to be queen
First Spanish-born future queen in a century
Guests represent 30 royal families and 15 heads of state
Other VIPs include sports stars Miguel Indurain, Severiano Ballesteros, Juan Carlos Ferrero and tenor Placido Domingo
In a traditional Roman Catholic ceremony, the archbishop of Madrid, Cardinal Antonio Maria Rouco Varela, pronounced the couple husband and wife.
The cream of the world's royalty attended the ceremony, with guests including Britain's Prince Charles and Japan's Crown Prince Naruhito, as well as other VIPs such as former South African President Nelson Mandela.
Four hundred guests attended a pre-wedding dinner at the Pardo royal palace, where later on Saturday guests at the reception will feast on a 2m-high wedding cake and wash it down with more than 1,000 bottles of champagne.
Prince Felipe and Ms Ortiz asked that their wedding mass be dedicated to the victims of the attack.
After the ceremony they paid their respects at a church close to the Atocha train station, which bore the brunt of the bombings.
The rain dampened the event for security and well-wishers alike
Money due to be spent on pre-wedding parties is instead going to a charity set up for the victims, and a spectacular wedding night show was cancelled out of respect.
Heavy security is keeping well-wishers at a distance from the cathedral and two F-18 fighter jets patrolled the skies, while Nato provided an Awacs surveillance plane for the ceremony.
Second time round
The prince's engagement to the 31-year-old divorcee was widely welcomed when it was announced in November.
Spain's gossip columnists had speculated for years on the lovelife of one of Europe's most eligible royal bachelors.
An earlier relationship with a former Norwegian lingerie model had been widely criticised.
Ms Ortiz's marriage to the prince was not opposed by Spain's Roman Catholic church because her first wedding was not held in a church.
Millions of people around the world were expected to watch the ceremony on television, making it Europe's biggest royal wedding since Prince Charles married Diana Spencer in 1981.
However, the wedding has drawn protests from Spain's republicans who are angered by the extravagance of the event.