The Illinois Court of Appeals ruled on Feb. 16 that a transgender Chicago man should not be granted custody of a 10-year-old boy he helped raise with his ex-wife, the Chicago Sun-Times reported.

Sterling Simmons, 46, was not legally a man when he married Jennifer Simmons. Jennifer Simmons later carried a baby after being artificially inseminated. Because Illinois does not recognize same-sex marriage, the court ruled that the Simmons’ union was not valid and that Sterling Simmons cannot claim custodial rights—even though the boy has indicated that he wants to live with his father.

‘This is a terrible decision,’ Shannon Minter, legal director for the National Center for Lesbian Rights, told PlanetOut. Minter, who had been assisting Sterling Simmons’s attorney, added that ‘ [t] he decision does not have a single sentence addressing the best interest of the child.’

The ruling supported a 2003 opinion by Cook County Judge Gerald Bender.