Sofia Vergara has won a massive victory in her years-long battle with an ex over their frozen embryos.
A judge has permanently blocked Nick Loeb from using them with a surrogate.
Vergara won over the L.A. County Superior Court, where Loeb had been fighting to bring the embryos to term — even attempting to take custody of them through a trust …
In addition, he gave the fertilized eggs names in a lawsuit.
And the judge ruled that his intended route would not be an option — not without Sofia’s consent, that is.
RELATED: Sofia Vergara Suffers Major Legal Blow in Ongoing Frozen Embryo Case Against Her Ex-Fiancé
The judge granted a permanent injunction stating the contract they both signed with a fertility clinic back in 2013 remains valid.
And due to that contract, the court ruled Nick can’t try to use the embryos for his own purposes and give them rights.
He attempted to do this in a Louisiana court — arguing the embryos should be recognized as people with rights.
RELATED: Sofia Vergara Is Giving Us Quality Fashion at Affordable Prices Sold Exclusively at Walmart
He recently got shot down there as well — and now, he’s lost again in L.A., where this whole mess started not too long after he and Sofia split in 2014.
Not surprisingly, his case was dismissed in Louisiana as well. The pair split in 2014.
Sofia is now married to Joe Manganiello and only has one child to date from a previous relationship.