Namibia's Supreme Court on Tuesday recognised same-sex marriages contracted abroad between citizens and foreign spouses, a landmark ruling in a country where homosexuality is illegal.
The decision overturns a ruling reached last year by the High Court, which refused to accept same-sex marriages concluded outside Namibia.
Two Namibian nationals had sought recourse from the courts after the ministry of home affairs and immigration refused to grant permits to same-sex foreign spouses whom they had married outside the country.
"This Court accordingly found that the approach of the Ministry to exclude spouses, including the appellants, in a validly concluded same-sex marriage... infringes both the interrelated rights to dignity and equality of the appellants," the ruling said.
Annette Seiler, who is married to German national Anita Seiler-Lilles, brought the case along with Namibian citizen Johann Potgieter and his South African husband, Matsobane Daniel Digashu.
Their marriages were respectively concluded in Germany and South Africa
Namibia has seen a flurry of court cases on the rights of same-sex couples to marry, become parents and immigrate.
Homosexuality is illegal in Namibia under a rarely-enforced 1927 sodomy law dating to its period under South African rule.
South Africa, under its liberal post-apartheid constitution, is the sole African nation which allows gay marriage, legalised in 2006.
In March this year, the same paramount court overturned a decision by a lower court to grant citizenship to a gay couple's four-year-old son who was born in neighbouring South Africa through surrogacy.