(CNN) -- A Florida circuit judge Tuesday struck down a 31-year-old state law that prevents gays and lesbians from adopting children, allowing a North Miami man to adopt two half-brothers he and his partner have raised as foster children since 2004.
Martin Gill looks on as a judge overturns a ban preventing gays and lesbians from adopting children.
"There is no question, the blanket exclusion of gay applicants defeats Florida's goal of providing dependent children a permanent family through adoption," Judge Cindy S. Lederman wrote in her 53-page ruling.
"The best interests of children are not preserved by prohibiting homosexual adoption."
The state attorney general's office has appealed the decision.
Lederman said there is no moral or scientific reason for banning gays and lesbians from adopting, despite the state's arguments otherwise. The state argued that gays and lesbians have higher odds of suffering from depression, affective and anxiety disorders and substance abuse, and that their households are more unstable.
Lederman said the ban violated children's right to permanency provided under the Florida statute and under the federal Adoption and Safe Families Act of 1997. Whether the ban violated the state's equal protection clause by singling out gays and lesbians should be considered, she said.
Lederman's ruling paves the way for Martin Gill to legally adopt the two half-brothers, ages 4 and 8, whom he has cared for since December 2004, the American Civil Liberties Union said.
The two boys, who are referred to as John and James Doe in court documents, were removed from their homes on allegations of abandonment and neglect.
"On that December evening, John and James left a world of chronic neglect, emotional impoverishment and deprivation to enter a new world, foreign to them, that was nurturing, safe, structured and stimulating," Lederman wrote.
In 2006, the children's respective fathers' rights were terminated, court documents said, and they remained in the care of Gill and his partner.
"Our family just got a lot more to be thankful for this Thanksgiving," Gill said Tuesday, according to the ACLU, which represented him.
Florida is the only state that specifically bans all "homosexual" people from adopting children, although it does allow them to be foster parents.
This month, Arkansas voters approved a ballot measure to prohibit unmarried partners -- same-sex or opposite-sex couples -- from adopting children or from serving as foster parents. The measure is similar to one in Utah, which excludes same-sex couples indirectly through a statute barring all unmarried couples from adopting or taking in foster children.
Mississippi allows single gays and lesbians to adopt, but prohibits same-sex couples from adopting.
Neal Skene, spokesman for the Florida Department of Children and Families, said the appeal was filed so a statewide resolution on the law could be determined by an appellate court. He noted that another Florida circuit judge declared the law unconstitutional this year but that ruling had not been appealed.
"We need a statewide determination by the appellate courts," he said.
Gill's adoption petition cannot be approved until the appeal process is finished, Skene said, but the children will remain in Gill's home.
"These are wonderful foster parents," Skene said. "It's just that we have a statute, [and] the statute is very clear on the issue of adoption."
Several organizations -- including the National Adoption Center, the American Medical Association, the American Psychological Association and the American Academy of Pediatrics -- have said that having gay and lesbian parents does not negatively affect children.
The Evan B. Donaldson Adoption Institute, a nonprofit organization that studies adoption and foster care, hailed the decision.
"This ban, which was the only one of its kind in the country, has done nothing but undermine the prospects of boys and girls in the foster care system to get permanent, loving homes," said Adam Pertman, the Adoption Institute's executive director, in a written statement.
"So this decision by Judge Lederman is a very important, hopeful ruling for children who need families."