Nick Loeb's embryo lawsuit against Sofia Vergara has been thrown out by a judge in Louisiana.

Nick Loeb and Sofia Vergara

Nick Loeb and Sofia Vergara

The 'Modern Family' actress has been locked in a legal battle with former fiancé Nick after he filed a suit in 2015 to protect, and bring to term, two female embryos, which they had created and planned to use with a surrogate during their relationship.

However, a judge in Louisiana, which is the only state where embryos have legal rights of their own, has ruled that the court has no jurisdiction in the case because the embryos were conceived in California, TMZ reports.

Sofia and Nick had signed a contract at the ART Reproductive Center in Beverly Hills when they created the embryos in 2013, which stated neither could use the embryos without the consent of the other.

However, Nick's lawsuit argued the agreement should be deemed void as it didn't say what should happen if they split, and it violated California code and Louisiana law.

Nick had previously filed to protect the embryos in California, but reportedly dropped that case after a judge ruled in favor of the actress' legal team, who had applied to force the businessman to identify two former lovers who had had abortions during his relationships with them.

He had appealed the decision but was turned down.

Though Nick, 42, now most of his time between New York and Florida, he still serves as a reserve police officer in Louisiana, and is a graduate of Tulane University in the state.

He also claimed that he and Sofia, 45, had dated and made plans for their future together in the state but the judge rejected this and added that Nick had likely only filed his lawsuit in Louisiana because of its laws on the rights of embryos.

Sofia - who is married to Joe Manganiello - was sued by the embryos last year, when a right-to-live lawsuit was filed on their behalf.

The lawsuit - which was filed in Louisiana, a traditionally pro-life state that offers special legal protections for frozen embryos - also has James Carbonnet, the eggs' 'trustee', listed as a plaintiff.