ANNAPOLIS, Md. — A transgender man has asked Maryland’s Court of Appeals to review a lower court’s decision that denied him visitation and custody rights to a child conceived before he and his partner were married and later divorced.

Free State Legal reports that, before his gender transition, Michael Conover was in a committed same-sex relationship for nearly a decade with Brittany Eckel.

In 2009, before marriage equality for same-sex couples was legalized in Maryland or any nearby jurisdiction, Conover and Eckel decided to have a child together by artificial insemination. They chose an anonymous sperm donor on the basis of physical resemblance to Conover, and when Eckel gave birth to their son Jaxon, the child was given Conover’s last name. A few months later, Conover and Eckel married in nearby Washington D.C., where marriage between same-sex couples had become legally recognized. They parented Jaxon together for the first two years of his life, but later broke up. In their divorce case, Conover asked the court for visitation with their son, but Eckel claimed that they had no children together. The trial court ruled that Conover is a legal stranger to Jaxon because he lacks a biological or adoptive relationship to the child.

In August, Maryland’s intermediate appeals court, the Court of Special Appeals, upheld the trial court’s decision.

Conover argues he is entitled to custody and visitation rights. He cites a longstanding Maryland law that holds when a woman who is not married gives birth to a child, a person who then marries the mother and acknowledges their parentage of the child is considered the child’s other legal parent.

But the lower courts determined that Conover’s case is controlled by a pre-marriage-equality decision in which the Court of Appeals held that when only one member of a same-sex couple adopted a child, she was the child’s only legal parent even though the other member of the couple had been a “de facto parent” of the child.

Conover has been unable to see his child for more than two years.