EDITOR's NOTE: An earlier version of this story included an inaccurate headline about the status of the case. In fact, the court decision against Ms. Vergara is a procedural ruling in what could be a protracted legal battle. She has asked the federal judge to reconsider the ruling, which would transfer the case to state court in Plaquemines Parish.

"Modern Family" star Sofia Vergara is in the midst of a domestic dilemma - and it's all playing out in Louisiana.

Vergara's ex-fiance Nick Loeb, a Tulane University graduate, has taken her to court for control of two human embryos they created back in 2013, in an attempt to have a child via surrogate.

Loeb first took his ex to court for the matter back in 2014 in his home state of California, but later dropped the suit.

He subsequently established a trust for the embryos in the much more pro-life state of Louisiana, where he then proceeded to sue Vergara.

According to court documents, Vergara removed the suit from Jefferson Parish's 24th District Court in Gretna to U.S. District Court in New Orleans. She persuaded Judge Mary Ann Vial Lemmon to dismiss it because the actor was not subject to personal jurisdiction in Louisiana.

Loeb then took up residence in Plaquemines, and sued in state court in Belle Chasse on Jan. 9, invoking Louisiana's Uniform Child Custody Jurisdiction and Enforcement Act.

Vergara subsequently had the case removed to federal court, on the basis that Louisiana's law pertains to living children - not embryos.

Loeb then brought the case Belle Chasse, where Lemmon sided with him, saying "it's a custody case over which federal courts lack jurisdiction."

Vergara is set to return to court on July 11 to ask for reconsideration.

Loeb is reportedly trying to have the embryos - named Emma and Isabella - implanted in another woman.

The embryos are currently frozen at a Beverly Hills clinic.