Olivia Wilde just obtained custody of her children from ex-fiancé Jason Sudeikis in New York City.

This was after a judge ruled that California was the home state of her children.

The 46-year-old "Ted Lasso" actor sued his spouse in New York City Family Court for his two children, claiming he wanted them to live with him in Brooklyn.

The "Don't Worry, Darling" director desired that her children stay with her in Los Angeles and maybe go to the United Kingdom, where her boyfriend Harry Styles lives.

Additionally, Sudeikis has been accused of aggressively delivering her custody papers, but the case was rejected by a judge on Wednesday.

The court found that the "reasons mentioned on the record on July 15, respondent's [Wilde] request to dismiss the custody petitions filed on Oct. 21 is granted," according to a legal filing obtained by Page Six.

Because Otis and Daisy are from California, the court concluded that New York did not have the sole authority to consider the custody petitions.

In May, Wilde filed a petition in the Superior Court of California in Los Angeles to ascertain the parental tie.

The following month, her legal team filed a move to formally dismiss her ex's custody lawsuit.

However, other legal experts will have to stand trial in California, where the entire process will be restarted.

READ ALSO: Naomi Judd 5-Page Will Questioned By Handwriting Expert: 'They're Traced'

Will Olivia Wilde and Her Children Relocate To The UK With Harry Styles?

Holly Davis, a family law attorney in Texas, believes Olivia Wilde will be denied permission to transfer her children to London.

"It is quite doubtful that Olivia can move to the UK due to the premise that family courts cling to, which is to keep parents together," a legal expert with considerable experience in high-net-worth divorces told the Daily Mail. Generally, they are close to their children while divorcing."

"Celebrities and prominent individuals have a difficult time understanding this notion, especially when it comes to their children and family," she continues, "yet it is vital in family court disputes all throughout the country."

Jason Sudeikis and Olivia Wilde's once-friendly custody and co-parenting arrangement turned sour after the latter announced plans to relocate to London.

In her move to dismiss the lawsuit, she stated that the two parents initially agreed to send their children back to school in Los Angeles for the forthcoming school year because Sudeikis would be concluding the last season of his program, which required him to remain in London.

In his petition, the actor also stated that he, Wilde, and his two children had been living in London since December 2021, but that he wanted to return to his "permanent residence" in Brooklyn after filming was over.

He also hoped that Wilde and their children would join him in New York to continue their present parenting arrangement.

It's also worth mentioning that the family lived in New York for the majority of their relationship, where their children were born. They shared a house in 2014 and remained there until it became unusable due to mold.

READ MORE: Wendy Williams Finally Gains Bank Accounts After 8 Months?