This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

BRUSSELS (AP) — A ruling by the European Union’s top court on Tuesday has boosted the rights of same-sex parents and their children in the 27-nation bloc.

The European Court of Justice said a child with two mothers certified in one EU nation must also be recognized by the other EU members as such.

The ruling was based on a case in Bulgaria, where a local court questioned whether authorities could refuse to register the birth of a Bulgarian citizen born in Spain to married mothers. The lack of such a Bulgarian birth certificate would impede the child’s chances for an identity card and hence, their freedom of movement in the bloc, a cornerstone of EU policy.

“This is a true testament to the EU being a union of equality and we look forward to seeing rainbow families enjoying their right to freedom of movement and other fundamental rights on equal footing to anyone else,” said Arpi Avetisyan of Europe’s LGBTI rights group ILGA.

The EU court said Spain had already established the child-parent relationship through a birth certificate and that because of it, the two same-sex parents “ be recognized by all member states as having the right, as parents of a Union citizen who is a minor and of whom they are the primary carers, to accompany that child when she is exercising her rights.”

The court noted that in Bulgaria, where there is no same-sex marriage, the birth certificate has one box for “mother” and another for “father” where only one name may appear. The Bulgarian mother of the child objected.

Parenthood often remains a Kafkaesque challenge for same-sex couples who are faced with heaps of additional bureaucracy and other demands that traditional couples do not face.

Globally, the EU already includes 16 nations that have legal same-sex marriage, compared to about 30 nations overall in the world.

For the group ILGA, the ruling gives a legal backbone to last year’s commitment by EU Commission President Ursula von der Leyen when she came out in defense of LGBT rights and said “If you are parent in one country, you are parent in every country.”