A panel of three judges has dismissed an application by same-sex couples in Namibia for their foreign spouses to live and work in the country.
The judges of the High Court ruled that they were bund by a 20-year ruling of the more senior Supreme Court that the relationships of same-sex couples were not recognised by Namibian law, rights activist Omar van Reenen told the BBC's Shingai Nyoka.
The case centred on two couples: Daniel Digashu and Johan Potgieter and a second couple, Anette Seiler-Lilles and Anita Seiler-Lilles.
Mr Digashu, a South African, had an application for a work permit denied, while German-born Anita Seiler-Lilles failed in a bid to get permanent residency because of their same-sex marital status, Reuters news agency reports.
Both couples secured their legal partnerships outside Namibia, it says.
Their legal team is expected to appeal against the ruling.
The case is one of several recent legal challenges to Namibian laws which human rights groups say are outdated and discriminatory.
Last year a Namibian high court granted citizenship to a gay couple's two-year-old son born via surrogacy.