His execution took place even though Ban urged US authorities to comply with the International Court of Justice (ICJ) order, which demanded a stay of execution and a review of his case and that of other Mexican death row inmates.

"All decisions and orders of the International Court of Justice must be respected by states," Ban warned in Mexico City, where he was attending the world AIDS conference.

"The United States should take every step to make sure the execution does not take place," he added, saying he had taken all the necessary steps to delay Medellin's execution, detailed in a letter to the United States, and that he was "confident" his demands would be accepted.

But the US State Department said it had done all it could and was powerless to stop the execution, citing a Supreme Court decision in March saying the president lacked the constitutional power to intervene in the case.

"We have an indisputable international law obligation that conflicts with state law," he said. "The Supreme Court has ruled the president has neither the constitutional power nor the legislative authority to overturn the state rules."

The ICJ had told US authorities in 2004 to review the sentences of 51 Mexicans facing execution, arguing that they were in breach of the Vienna Convention for having failed to inform them of their right to consular access and assistance during trial.

Last month, the world court asked the United States to grant a stay of execution to Medellin and four other Mexicans on death row.

In their appeal to the Supreme Court, Medellin's lawyers asked for a reprieve to give the US Congress and Texas legislature time to pass legislation allowing the state to comply with ICJ orders.

The US House of Representatives took up such a bill after the ICJ's July 16 ruling. But Congress is now in recess until September.

Medellin's execution was delayed more than three hours while the top US court wrestled with his petition.

In a 5-4 decision, the majority wrote that the chance for the legislatures to take action was "too remote" to justify a stay of execution.

The majority added that the US Justice Department never asked it to intervene in the case.

"Its silence is no surprise: The United States has not wavered in its position that petitioner was not prejudiced by his lack of consular access," it said.

In a dissenting opinion, Justice Stephen Breyer wrote that Medellin's execution "will place this Nation in violation of international law."

Since the 2004 ruling, some US states have agreed to review their death row cases at President George W. Bush's request.

But Texas has refused, arguing -- with the support of the March Supreme Court ruling -- that its state courts, which decided the Medellin case, are not bound by the ICJ treaty.

That left the federal government with no legal tools to force Texas to put off the execution.

Amnesty International had urged Governor Rick Perry to stay the execution.

"Even President Bush, who signed scores of death warrants as Texas governor, concurred some time ago that the United States must honor its international obligations in this case," said Larry Cox, executive director for Amnesty in the US.

"There will be no clearer sign that Texas will have gone beyond the pale than if Jose Medellin's execution goes forward."

Medellin was sentenced to die for the rape and murder of two girls aged 14 and 16 in 1993 in Houston. The girls happened upon Medellin, who was 19 at the time, as he was engaged in a street gang initiation rite.