Namibia's High Court on Thursday ruled against two gay couples fighting for their marriages to be recognised under domestic law.
The couples involved in the cases were Daniel Digashu and Johan Potgieter and a second couple, Anette Seiler-Lilles and Anita Seiler-Lilles.
Digashu, a South African, and German-born Anita had applied for a work permit and permanent residency but were denied based on their same-sex marital status.
Judge Hanelie Prinsloo said she agreed with these arguments but was bound by a previous over-20-year ruling by the Supreme Court, which said Namibia does not legally recognise same-sex relationships.
"Only the Supreme Court can correct itself," she said, adding it was high time the Namibian constitution reflected that same-sex relationships are part and parcel of society.
Both couples secured their legal partnerships outside of Namibia, where they now live together as a family.
The case is one of the many recent legal challenges to Namibian laws which human rights groups have described as outdated and discriminatory.
Their legal team is expected to appeal against the ruling.
Same-sex relationships are illegal in many African countries from Algeria in the north to Eswatini in the south, and couples’ risk being jailed or openly scorned in public.
In court, they argued that the word "spouse" in Namibia's Immigration Control Act should include same-sex spouses, or, failing that, that the relevant section of the act should be declared unconstitutional.
Anette Seiler-Lilles said while the decision was disappointing, it also gave hope things could change, and that they would now discuss an appeal.