RIO DE JANEIRO - Brazil's chief justice has ruled in favor of a New Jersey man who has waged a five-year legal battle for his son, ordering Brazilian relatives yesterday to turn over the 9-year-old boy.

The decision put David Goldman one step closer to being reunited with his son, Sean, and appeared to bring the case in line with international custody accords.

The boy was taken by Goldman's now-deceased ex-wife to her native Brazil in 2004, where he has remained. Goldman, of Tinton Falls, has been fighting to get him back from the boy's stepfather.

Both the U.S. and Brazilian governments have said the matter clearly fell under the Hague Convention, which seeks to ensure that custody decisions are made by the courts in the country where a child originally lived - in this case, the United States.

Goldman's New Jersey-based attorney, Patricia Apy, said yesterday that she believed the order by Supreme Court Chief Justice Gilmar Mendes required Sean to be handed over immediately, but she said Goldman's attorneys had not heard from lawyers for the Brazilian family.

Lawyers on both sides have said there was still a chance for the Brazilian family to appeal to Brazil's highest appeals court, though the chances of success seemed slight.

Goldman declined to comment until he learned more details about the 50-page ruling. Calls to the Brazilian family's lawyer were not returned.