French gay couples with children born to foreign surrogate mothers won a key victory Wednesday, with the country's highest appeals court ruling that the partner of the biological father could adopt his child.

Surrogacy, when a woman carries a child for a couple that cannot conceive -- sometimes for financial gain -- is banned in France.

Some gay couples have turned to surrogate mothers in countries such as the United States, where the practice is legal in some states, in order to have children.

Until now, however, France has refused to recognise the partner of the biological father as one of the child's parents.

Weighing in on an issue that has divided French liberals and conservatives, the Cour de Cassation refused a request that French authorities automatically recognise the two parents listed on the foreign birth certificate.

But it ruled that the father's partner could apply to adopt the child, in line with a 2013 law allowing both gay marriages and adoptions.

Patrice Spinosi, lawyer for a gay couple whose child was born to a surrogate mother in California, welcomed the "third way" ruling.

"It's not entirely satisfactory for all families but it allows children born to surrogate mothers to have a filial relationship with both their parents -- their biological father and their sociological parent (the other partner in the couple)," he said.

Up until 2015, France refused to recognise surrogate children as French citizens -- a hardline stance that left the children in limbo.

After being rapped by the European Court of Human Rights, France eventually agreed to give the children birth certificates and recognise their biological fathers.

Surrogacy is a hot-button topic in France, with Catholic groups fiercely opposed to any concessions to gay couples who circumvent the ban by using foreign surrogate mothers.

The ruling is the second victory in a week for same-sex couples who want children.

Last week, a national ethics body recommended allowing single women and lesbian couples to receive fertility treatment.

Currently only heterosexual couples have access to assisted reproductive technology (ART).