(CNN)  -- The chief justice of the Brazilian Supreme Court ruled Tuesday in favor of an American father in an international custody battle.



The ruling by Chief Justice Gilmar Mendes will reunite a 9-year-old boy with his father, David Goldman, who has been locked in a custody battle with the family of the boy's deceased mother.



Last week, a lower court unanimously upheld a decision ordering that Sean Goldman be returned to his father in New Jersey.



David Goldman arrived in Rio de Janeiro to reunite with his son, but one Supreme Court justice issued a stay, ordering Sean to remain with his Brazilian relatives until the high court could consider the case.



Mendes' decision lifted the stay, paving the way for Goldman to be reunited with his son.



Sean's grandmother, Silvana Bianchi, was expected to immediately file appeals to Tuesday's ruling.



In a letter to Brazilian President Luiz Inacio Lula da Silva, Bianchi said that the legal process was overlooking the boy's own desires.



"I feel threatened by losing my grandson Sean because of international pressures that don't consider the interest of a 9-year-old child who passionately desires to remain among those that gave him comfort in the mother's death," the letter states in part. "They allege that the Hague Convention determined to hand him over immediately. I am not a lawyer. But what I know is that the Convention establishes as priority the interest of the child, and the child wasn't heard."



The custody battle began in 2004, when Goldman's wife, Bruna Bianchi, took their then-4-year-old son from their home in New Jersey to Rio de Janeiro for what was to have been a two-week vacation. She never returned, instead remarrying there and retaining custody of Sean. She died last year in childbirth.



Goldman has argued that as the sole surviving parent, he should be granted custody.



The Bianchi family argues it would traumatize Sean to remove him from what has been his home for five years.



The custody battle garnered much media attention and spilled over into the political arena as well.



U.S. Sen. Frank Lautenberg, D-New Jersey, had placed a hold on a trade bill that would have benefited Brazil to the tune of $2.75 billion, but he lifted it on the court's ruling, spokesman Caley Gray said.



The bill in question, which sailed through the Senate after the senator dropped the hold, would provide export tariff relief to 130 countries, of which Brazil would be the fifth largest recipient, Gray said.



Lautenberg's hold was designed to exert additional pressure on Brazilian authorities to abide by the court order to return Sean to his father, he said.



While the chief justice was still studying the case, Brazilian Attorney General Luis Inacio Adams said the executive branch sides with Goldman.



"Once we stop cooperating and start breaking our treaties and international obligations, Brazil risks the chance of not having its own requests in the matters regarding international judicial help granted, based on the principle of international reciprocity," Adams said Monday.



"Not releasing the minor into the custody of his father could bring sanctions against Brazil," he added. "It could damage Brazil's image before the international community."



CNN's Mariano Castillo and Adam Reiss contributed to this report.
Who lifted the restraining order keeping the boy in Brazil? In what city did Sean live with his mother's family after she died? On what date did Goldman's wife take Sean from New Jersey to Rio de Janeiro? Where did Goldman's wife take Sean for two weeks? Who has been locked in a legal battle?
Chief Justice Gilmar Mendes Rio de Janeiro 2004, Rio de Janeiro David Goldman,
question: Who lifted the restraining order keeping the boy in Brazil?, answer: Chief Justice Gilmar Mendes | question: In what city did Sean live with his mother's family after she died?, answer: Rio de Janeiro | question: On what date did Goldman's wife take Sean from New Jersey to Rio de Janeiro?, answer: 2004, | question: Where did Goldman's wife take Sean for two weeks?, answer: Rio de Janeiro | question: Who has been locked in a legal battle?, answer: David Goldman,