Judge Gerald Bender issued a 13-page ruling in the case involving a nearly 11-year-old boy and the person he regards as his father.
Cook County Public guardian Patrick Murphy, who represents the child, said the boy wants to live with his father. He said the case would be appealed.
The boy was conceived through artificial insemination.
"Because the mom and dad held themselves out as parents, he has a relationship with the alleged father, treats him as a father, loves him as a father, and I think its unconstitutional to cut off that relationship after 11 years," Murphy said.
Bender said the "father" has no legal standing in the case, but he continued visitation, saying the controlling factor on that issue is the child's best interests.
The "father" began hormone therapy 24 years ago when she was 18. Both her ovaries and uterus were removed in 1991, and her birth certificate was changed to reflect her gender change.
The child was conceived through artificial insemination in 1989, and both parents signed a contract, agreeing to raise the child. The boy was born July 20, 1992, and the names of both parents were entered on the birth certificate.
The couple separated in the mid-1990s, and the mother went to live with her parents.
Attorney Burt Hochberg, who represents the mother, said even though the couple underwent a marriage ceremony in 1985 and a minister signed a marriage certificate, the union was void because the "father" retained female genitalia.
Murphy said all that is irrelevant. He said the only thing that matters is the boy knows his "father" and accepts him as a parent.