Olivia Wilde is walking out victorious after Jason Sudeikis took her to court over the custody of their children.

Page Six reports that the judge overseeing their case has dismissed Sudeikis’ custody petition after determining the children’s home state is in California.

A legal filing signed by Danielle M. Rodriguez, Esq. Court Attorney-Referee reads, “Judge Powell and this Referee agreed that New York was not the home state of the subject children; but rather California was the children’s home state.”

READ MORE: Jason Sudeikis ‘Deeply Regrets’ Serving Ex Olivia Wilde Custody Papers During Public Speech, References Harry Styles In New Court Docs

It continues, “Therefore, for the reasons stated on the record on July 15, 2022, respondent’s motion to dismiss the custody petitions filed on October 21, 2021 is granted as this court finds that New York does not have jurisdiction to hear the custody petitions as New York is not the home state of the subject children.”

Sudeikis’ petition originally asked for the case to be heard in New York, where the actor hopes to reside with his children, however, his case has been dismissed as the children reside in California currently.

Wilde has filed her own petition to “determine parental relationship in Superior Court of California, in LA.”

READ MORE: New Trailer For Olivia Wilde’s Thriller ‘Don’t Worry Darling’ With Harry Styles Uncovers The Dark Side Of Suburbia

The battle came to media attention after Wilde was served the papers while onstage at CinemaCon, a move she called “outrageous”.

“He could have served me discreetly, but instead he chose to serve me in the most aggressive manner possible,” she said at the time.

The exes share 8-year-old Otis, 8, and 5-year-old Daisy together.