A Namibian court has refused to issue a gay man emergency travel documents so that he can bring home his twin daughters from South Africa where they were born by surrogate.
The authorities say Phillip Lühl must show genetic proof that he is their father before they can travel.
Mr Lühl, 38, and his Mexican husband Guillermo Delgado say this is discriminatory.
Both fathers’ names are on the babies’ birth certificates.
Mr Lühl, a university lecturer and Namibian citizen, has argued that the paternity test being demanded of him would not be required from a single mother or heterosexual couple.
He told the BBC his daughters were currently “stateless”, and previously told AFP that Namibia’s refusal amounted to “state-sanctioned homophobia”.
Sexual contact between males is forbidden in Namibia but the law is rarely enforced.
Neighbouring South Africa meanwhile – where the couple got married – was the first country in the world to use its constitution to outlaw discrimination on the grounds of sexual orientation back in 1996.
Mr Delgado is in Namibia with the couple’s two-year-old son, while Mr Lühl is stuck in Johannesburg with the girls who are five weeks old.
The BBC’s Nomsa Maseko in Johannesburg says more details of the Namibian judge’s ruling are to be made public later on Monday.
Namibia’s government said in March that the home affairs minister “did not agree to a request to issue the twins Namibian travel documents, because their entitlement to Namibian citizenship by descent had not been determined”.
Mr Lühl says he was told he did not follow the correct application, and accuses the Namibian authorities of a “cop-out with technicalities”.
Before Windhoek High Court’s ruling on Monday, LGBTQ activists had decried the government’s stance and a number of Mr Lühl’s supporters took part in street protests a month ago.
The couple have another ongoing case in Namibia, where they are seeking citizenship for their two-year-old son, born to the same surrogate in South Africa.
They say there is a possibility they will appeal against the judgement once it has been reviewed by their lawyers.
Mr Lühl told the BBC that he and his family might consider giving up their life in Namibia and moving away if they lose in the courts, saying that the country is not as “progressive” and “free and equal” as it likes to think it is.
“The narrative of inclusivity being peddled at the highest levels really is not the case.”