France's highest court has granted legal recognition to surrogate children in a landmark ruling that will allow them to share their parents' nationality and enjoy the same rights as other French children. Up until now, children born abroad to a surrogate mother were not granted civil status by the state.

Surrogacy itself, however, remains prohibited in France.

Une GPA ne justifie pas à elle seule le refus de transcrire à l'état civil l'acte de naissance étranger d'un enfant ayant un parent français — Cour de cassation (@Courdecassation)3 Juillet 2015

"Surrogacy does not in of itself justify the refusal to record in the civil status register the foreign birth certificate of a child with a French parent"

The court had been hearing two separate cases involving two French men who biologically fathered children to surrogate mothers in Russia. One of the men has not been identified by French media, while the other has been named as Dominique Boren, 51, a married gay man who has been with his partner for 25 years, according to Le Figaro.

Surrogacy may involve a woman carrying an embryo created using the egg and sperm of a separate couple through in vitro fertilization. In other instances, the surrogate mother may be the biological mother of the child.

After his son's birth, Boren sought to obtain a French birth certificate for his child, but the government refused. Under usual circumstances, a child born abroad to a French parent would automatically be granted French citizenship.

The ruling marks a major turnaround for France, following several high-profile legal battles over the last 10 years in which parents failed to convince the state to recognize their surrogate children. Before the decision, surrogate children had were not granted any legal connection to their French parent/s, or given civil status in France because of their foreign birth certificates.

In 2011, a French court denied citizenship to twin girls born in 2000 to a surrogate mother in California, prompting the parents to take their case to the European Courts of Human Rights (ECHR). Dominique and Sylvie Mennesson paid 15,000 euros to a surrogate because Sylvie was unable to conceive children herself. The twins were conceived from sperm from Dominique and an egg donated by a friend of Sylvie's.

In 2014, the ECHR ordered France to change its laws to recognize children born to surrogate mothers abroad, despite the country's ban on surrogacy. The ruling was informed by cases brought by the Mennessons and another French family.

At the time, France said it would not dispute the ruling and said it would take the court's judgment into account in its domestic law. The ECHR does not have the power to impose concrete measures on signatory countries.

As well as impacting issues of identity, Friday's decision will have many practical repercussions for the lives of surrogate children — sometimes known as "the ghosts of the Republic" — facilitating everything from school enrollment and access to medical care to questions of inheritance and the issuing of passports and ID cards.

Yet the court's decision has been contested by conservatives in France, including Printemps Français, a movement with links to the Catholic traditionalist far right, which called for its supporters to gather outside the Paris Palais de Justice Friday night to protest the verdict.

Despite the ruling, surrogacy remains illegal in France, and can be punished with a 7,500 euro ($8,300) fine and up to six months in prison.