Switzerland’s highest court has struck down a 2014 ruling allowing both partners in a gay relationship to be registered as the parents of their child.

Last year an administrative court in the canton of St Gallen ruled both men could be entered into the register as the boy’s parents.

Now the Swiss Federal Supreme Court returned a three to two verdict denying the men, who relied on a Californian surrogate to conceive and carry their child, to both be recognized as the child’s legal parents.

Only the man whose sperm was used to fertilize an anonymous donor’s egg is accepted as the father; this means the Courts only partially acknowledge the Californian birth certificate listing both men as the child’s parents.

Donating eggs and using a surrogate to conceive a child are banned in Switzerland; the judges based their verdict on the fact that ignoring this ban would go against Switzerland’s Ordre public.

To comply with the four-year-old boy’s right to know who his parents are, the surrogate will be listed as the biological mother while it will also be noted that the egg donor was anonymous.

The other partner can also not adopt the boy as his step-son under Switzerland’s adoption laws.

Pink Cross, Switzerland’s organization for homosexual men, said: ‘We’re wondering what will happen, should something happen to the legal father.’

National LGBTI family organization Regenbogenfamilien (rainbow families) said they were disappointed by the rule and feared the family would face disadvantages after this ruling.

The couple’s lawyer, Katrin Hochl, claimed the rule was a ‘fundamental violation’ of the child’s wellbeing and prevented legal security.

Regenbogenfamilien and Hochl criticized the court for ignoring the men’s real situation and said they had missed out on the chance to link law and real living situations.