The United Nations' highest judiciary, also known as the World Court, was considering whether 52 convicted murderers had received their right to assistance from their government in a case filed by Mexico.
"The US should provide by means of its own choosing meaningful review of the conviction and sentence" of the Mexicans, presiding judge Shi Jiuyong said.
Shi said the court had found the US violated its obligations in all but five cases in Mexico's case. He said the review, in almost all cases, could be carried out under the normal appeals process in the US.
"In each of these 47 (remaining) cases the duty to inform without delay has been violated," he said.
The World Court is charged with resolving disputes between nations and has jurisdiction over international treaties.
At the heart of the Mexico-US case is the 1963 Vienna Convention, which guarantees people accused of a serious crime while in a foreign country the right to contact their own government for help and that they be informed of that right by arresting authorities.
The US is portraying the case as a sovereignty issue, and says the 15-judge tribunal should be wary of allowing itself to be used as a criminal appeals court, which is not its mandate.
The US has portrayed the case as
a sovereignty issue
In hearings in December, lawyers for Mexico argued that any US citizen accused of a serious crime abroad would want the same right, and the only fair solution for the 52 men allegedly denied diplomatic help was to start their legal processes all over again.
Juan Manuel Gomez said that Mexico "doesn't contest the United States' right as a sovereign country to impose the death penalty for the most grave crimes," but wants to make sure its citizens aren't abused by a foreign legal system they don't always understand.
US lawyer William Taft argued that the prisoners had received fair trials. He said even if the prisoners didn't get consular help, the way to remedy the wrong "must be left to the United States."
In its written arguments, the US said that Mexico's request would be a "radical intrusion" into the US justice system, contradicting laws and customs in every city and state in the nation.
"The US should provide by means of its own choosing meaningful review of the conviction and sentence..."
presiding judge, International Court of Justice, The Hague
"The court has never ordered any form of restitution nearly as far reaching as that sought by Mexico," the arguments said.
In 2001, a similar case came before the court filed by Germany to stop the execution of two German brothers who also had not been informed of their right to consular assistance. One brother was executed before the court could act.
The judges ordered a stay of execution for the second brother, Walter LaGrand, until it could deliberate, but he was executed anyway by the state authorities of Arizona.
When the court finally handed down the belated ruling in 2001, it chastised the US government for not halting the LaGrand execution, and rejected arguments that Washington was powerless to intervene in criminal cases under the authority of the individual states.
Under the court's statute, its judgments are "binding, final and without appeal." Its rulings have rarely been ignored, and if one side claims the other has failed to carry out the court's decision, it may take the issue to the UN Security Council.