The Bush administration has unsuccessfully tried to get Texas courts to review the cases and said it expected the World Court's order to have little impact.
The World Court told U.S. authorities in 2004 to review the cases of 51 Mexicans sentenced to death by state courts after finding they had been denied the right to seek help from consular officials.
The World Court has no enforcement powers but President George W. Bush issued a directive to the Texas courts to abide by the 2004 ruling. The state courts refused to review the cases and the U.S. Supreme Court ruled 6-3 in March that the president cannot compel the state courts to comply.
Mexico turned again to the U.N. court in The Hague last month, arguing that the United States was defying the 2004 World Court order and asking the judges to issue an emergency injunction to stop the killings of five men whose executions were imminent.
Chief State Department advocate John B. Bellinger III argued that the World Court, the U.N.'s judicial arm for resolving disputes among nations, lacked jurisdiction because the Bush administration agreed with Mexico and there was no dispute.
"It almost never happens that the federal government enters an appearance in state court proceedings," he said, calling the Bush administration's intervention "highly unusual."
Mexico's chief advocate Juan Manuel Gomez-Robledo told the court the U.S. was nonetheless "in breach of its international obligations." He said international law applies not only to nations, but to their component states and asked the court to clarify its earlier ruling and in the meantime intercede with the U.S. authorities to halt the schedule of executions.
The U.N. judges ruled 7-5 Wednesday that it would consider Mexico's case and also try to stop the executions.
The World Court acknowledged that the U.S. federal government "has been taking many diverse and insistent measures" to persuade Texas not to carry out the execution of any of the 51 Mexicans covered by the original 2004 ruling.
Bellinger said that the World Court has limited powers over U.S. states or federal authorities in Washington.
"It does not have technical legal effect in the United States that would ... have a direct impact either on the United States or on Texas itself," he said.
Federal authorities were still discussing the case "constructively" with Texas, Bellinger said, and "Texas does take this all very seriously."
Mexico's ambassador to the Netherlands, Jorge Lomonaco Tonda, said he was satisfied with the result.
"We have full confidence that the ruling will be applied," he added.
The first of the Mexicans, Jose Medellin, is scheduled to be killed by lethal injection on Aug. 5 for taking part in the gang rape and murder of two teenage girls 15 years ago.