RIO DE JANEIRO - A New Jersey man's bitter five-year battle to regain custody of his son neared conclusion yesterday, when the child's Brazilian family halted its legal efforts as a court-ordered deadline for delivering the boy loomed.

David Goldman has said repeatedly that he would not feel relief until he is on a plane heading home with 9-year-old Sean at his side. But with a court ordering the boy's handover to occur this morning at the U.S. Consulate, the end appeared to be in sight.

Goldman's fight against a powerful family of Rio de Janeiro lawyers - a David vs. Goliath matchup in a nation where the wealthy are used to coming out on top - shifted in recent months, legally and among ordinary Brazilians.

The case was once largely viewed through a nationalistic lens. But with Goldman's persistent fighting, it has come to be seen on talk shows and in neighborhood bars as a father simply trying to be with his son.

Which is how Goldman has always framed it.

"Sean is my family, Sean is my son. It is our right to be together, not just a rule of law, not just a treaty, not he's Brazilian, not he's American, not he's from anywhere. He's my son and I should be able to raise my son and he should know his dad," Goldman said this week.

Goldman, of Tinton Falls, N.J., described in some news reports as a charter fishing boat captain, real estate agent, and model, won a big legal victory late Tuesday when Brazil's chief justice upheld a lower court's ruling ordering Sean returned to him.

Sean has lived in Brazil since Goldman's former wife, Bruna Bianchi, took him to her native country for what was supposed to be a two-week vacation in 2004, then filed for divorce. Last year, she died in childbirth.

Sean's stepfather, Joao Paulo Lins e Silva, continued the fight to keep the boy in Brazil, winning temporary custody of the boy.

He looked prepared to keep him in the family's massive compound with multiple buildings surrounded by tropical trees, a large wall and gate where expensive SUVs pass through and security guards keep 24-hour watch.

Lins e Silva, a prominent divorce lawyer in his father's law firm, used all legal means available to keep the boy. Despite several court rulings in favor of Goldman, Lins e Silva kept finding appeal routes.

But those court battles are now over.

Rep. Chris Smith, a New Jersey Republican who represents parts of Burlington and three other counties and is in Brazil with Goldman, said Goldman's attorneys believed Brazil's federal police were authorized to remove the child from the family if the court deadline was not met.

He also said the international police agency Interpol was notified to make sure Sean was not spirited out of the country by his Brazilian relatives.

Goldman declined to comment yesterday, as did the Brazilian family's attorney, Sergio Tostes, who referred all questions to his office.

An aide for Tostes said the legal fight was over.

"It is certain the family will not pursue any more legal channels," the aide said, speaking on condition of anonymity because she was not authorized to discuss the matter.

Silvana Bianchi, Sean's maternal grandmother, blamed U.S. pressure - in particular, the U.S. Senate's delay in renewing a trade bill worth $2.75 billion a year to Brazil - for losing her grandson.

She lodged an appeal before the Supreme Court last week, petitioning that the boy's own testimony about where he wanted to live be heard. That was denied Tuesday by Brazil's chief justice.

"He is really sad, he doesn't want to go," she told the Estado de S. Paulo newspaper.