Photo: Evan Agostini/Invision/AP/Shutterstock; JEAN-BAPTISTE LACROIX/AFP via Getty Images

Nick Loeb; Sofia Vergara

A Los Angeles court has ruled in favor ofSofia Vergarain her ongoing court battle with ex Nick Loeb overcustody rights to frozen pre-embryosthey created while together.

Vergara, 48, and Loeb, 45,ended their engagementin May 2014 after having undergone in vitro fertilization together the year prior. TheModern Familyactress, who has an adult son named Manolo, later marriedJoe ManganielloinNovember 2015.

In 2017, Vergara filed legal documents in California hoping toblock Loeb from being able to use, without her written consent, the frozen pre-embryos they created via IVF at the ART Reproductive Center in Beverly Hills when they were still together in 2013.

Sofía Vergara.Todd Williamson/NBCU/Getty

Sofia Vergara

“It’s sad that Sofia, a devout Catholic, would intentionally create babies just to kill them,” his statement read.

According to the court records, Loeb and Vergara previously signed a document, “the Form Directive,” at the fertility clinic agreeing that both parties had to agree in order to do anything with the embryos.

Loeb previously argued that he signed this form under “duress,” but the court on Tuesday found that “the Form Directive is not void or voidable based on Defendant Loeb’s duress defense as to its execution.”

Further, it found that there is no “material fact” supporting his previous claim that he and Vergara had an “oral agreement” that would allow him to implant the embryos in a surrogate to be born.

Never miss a story — sign up forPEOPLE’s free daily newsletterto stay up-to-date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human interest stories.

In addition to their legal battle in California, Loeb has continued his attempt to gain custody of the embryos in Louisiana, creating a trust in the state to give the embryos legal status.

This case was dismissed in January when the Louisiana courtsided with Vergara, upholding the dismissal of a lawsuit seeking to obtain custody of the pre-embryos.

At the time, an attorney for Loeb said they would be appealing the case to the Louisiana Supreme Court.

source: people.com