Nick Loeb’s never-ending legal war with “Modern Family” star Sofia Vergara over the exes’ frozen embryos has ended in Louisiana — again.

An appeals court has ruled that Loeb’s case should be tossed and that it made a “mockery of the Louisiana legal system.” The court also slammed Loeb’s filing in Louisiana as “abhorrent,” and ruled that all documents in the case be unsealed.

Loeb and Vergara split in 2014. But a battle over two frozen embryos from the couple’s 2013 IVF treatments has raged on for years after the split — as Loeb sought custody to bring them to term.

The case began in California, where the embryos are frozen — but Loeb then brought it to Louisiana, hoping the state would recognize the embryos’ legal rights.

He claimed he took up residence in the state, but the appeals court ruled on Jan. 27 that, “Loeb is not domiciled in, does not maintain a residence in, and does not have the intent to be domiciled or a resident of any parish in the State of Louisiana,” and that, “Vergara has met her burden of proving that her exception of venue was correctly granted by the trial court.”

The court added that, “Furthermore, based on all of the facts… it is clear that Mr. Loeb blatantly engaged in forum shopping when he selected [with his lawyer] Plaquemines Parish to file the instant lawsuit, with full knowledge that it was the improper venue. Their behavior brings disrepute to and makes a mockery of the Louisiana legal system and the bar and is abhorrent.”

Plaquemines Parish is part of the New Orleans-Metairie area.

According to the court papers, there is still a suit pending in California that was filed by Vergara in 2017, seeking “a permanent injunction to prevent Mr. Loeb from bringing the pre-embryos to term without Ms. Vergara’s express written consent,” as set out in a contract.

Sofía Vergara and Joe Manganiello
Sofía Vergara has been married to Joe Manganiello since 2015. Getty Images

An attorney for Loeb commented, “We will be appealing to the Louisiana Supreme Court.”

Vergara has been married to movie star Joe Manganiello since 2015. Loeb has a daughter with a girlfriend who lives in Europe, where Loeb spent 300 days between 2018 and 2019, the court ruling stated.