But preparations were disrupted when Jason Alexander, who was briefly married to the pop star in 2004, was arrested after allegedly gatecrashing.
He streamed a video on Instagram Live before the ceremony apparently from inside her home before being tackled.
Ventura County Sheriff’s Department told the PA Media news agency an altercation had taken place with security officers, and Mr Alexander had been charged with four misdemeanour offences of trespassing, battery and vandalism.
“He, Alexander who was the artistic director of “Reprise! Broadway’s Best in Los Angeles”, where he has directed several musicals, was able to find his way onto the property and was confronted by security,” a police spokesman said.
“An altercation occurred with the security officers and that’s where the battery occurred… and during the altercation, an item was broken, so that’s where the vandalism comes into play. And by being on private property, the trespass comes into play.”
Mr Alexander was married to Spears, his childhood friend, for less than 55 hours in 2004 before it was annulled.
His video showed him walking through her home looking for her and then going into a marquee where the finishing touches were being put to a large display of roses. He claimed Spears had invited him, saying: “She’s my first wife, my only wife.”
Donatella Versace dress
The ceremony went ahead later on Thursday, with stars including Madonna, Paris Hilton, Selena Gomez, Drew Barrymore, Ansel Elgort and will.i.am among the guests.
Donatella Versace designed the wedding dress, which Vogue described as an “off-the-shoulder custom Versace dress with a leg-revealing slit up one side and a classic white veil with satin edging”.
Spears told Vogue: “We really wanted to make this a small and beautiful moment with family and friends.”
It was a 10-minute ceremony and a white horse with gold hooves, pulling a white carriage covered in roses, was stationed outside, the fashion site said.
There was no first dance, but Gomez, Madonna and the bride danced to Spears’ 2003 single Toxic, before Hilton and Spears sang Hilton’s 2006 single Stars Are Blind, Vogue reported.
Watch The Bliss
Spears’ father, mother and sister were reportedly not at the wedding after relations broke down because of the conservatorship.
In November, Spears, 40, was released from the controversial 13-year legal guardianship, which had seen her father Jamie control many aspects of her life.
Last year, she told a court it had meant she was “not able to get married and have a baby”.
Jamie Spears previously said the conservatorship had been “necessary” for his daughter’s mental health but agreed it was time for her “to re-take control of her life”.
This April, she announced she had gotten pregnant, but announced the following month she had suffered a miscarriage.
Spears met 28-year-old personal trainer Asghari in 2016 on the set of her music video for the song Slumber Party.
In an interview with BBC Persian, conducted the month before her pregnancy announcement, Asghari said that marriage and plans to have children “should have happened three years ago”. The couple got engaged last September, two months before the end of the conservatorship
Watch: Sam Asghari talked in April about marriage, family and public support for Britney Spears
Asghari’s representative Brandon Cohen confirmed the couple’s nuptials to the Associated Press news agency on Thursday.
He said: “I am very ecstatic this day has come, and they are married. I know he wanted this for so long. He is so caring and supportive every step of the way.”
Mr Asghari is the star’s third husband. After Mr Alexander, she was married to Kevin Federline from 2004 to 2007.
Britney Spears discusses life after conservatorship