But High Court judge Hannelie Prinsloo said she was bound by a Supreme Court ruling from two decades ago that barred same-sex marriage in Namibia.
The couples expressed disappointment but said they would likely ask the Supreme Court to overturn its earlier ruling.
“We will most probably go on to the Supreme Court and change the current Supreme Court ruling so that it reflects justice,” said Anette Seiler, who is married to German national Anita Seiler-Lilles.
They brought the case along with Namibian citizen Johann Potgeiter and his South African husband, Daniel Digashu.
Potgeiter and Digashu have a 13-year-old son, Lucas, who was adopted in South Africa.
The son was granted residency in Namibia in an earlier case.
Namibia has seen a flurry of court challenges around same-sex couples marrying, parenting, and migrating.
Homosexuality is illegal in Namibia under a rarely-enforced 1927 sodomy law dating to its period of South African rule.
Last October, the Namibian High Court granted citizenship to a gay couple’s two-year-old son, ending a legal battle over surrogacy and same-sex parents.