A Curcuit Court Judge in Florida has ruled that an openly gay man can adopt a boy with special needs he has been fostering for the past seven years.

The state is one of two in the US that explicitly bans gay people from adopting.

The judge said that as the 31-year-old law singles out a group for exclusion it is “unconstitutional,” reported the Miami Herald.

Mississippi and Michigan have explicit policies banning same-sex couples from adopting, while the legal situation is unclear in many other states.

Single gay or lesbian people and same-sex couples are banned from adopting in Florida.

There are no specific restrictions on single gays adopting in any other state. Arkansas will vote on a ban in November.

The Republican nominee for President of the United States declared his opposition to gay adoption in an interview in The New York Times last month.

Senator John McCain said:

“I think that we’ve proven that both parents are important in the success of a family so, no, I don’t believe in gay adoption.”

Democratic party nominee Barack Obama has pledged to work towards the elimination of discrimination against LGBT families if elected.