Texas carried out the controversial execution of a Mexican national who was denied his consular rights, ignoring calls for a reprieve from the White House and the Mexican government.

Humberto Leal Garcia, 38, is one of at least 51 Mexicans on US death rows who were not informed after their arrests that they could get legal help from the Mexican consulate, a violation of the Vienna Convention.

He was executed at 6:21 pm (2321 GMT) in a Huntsville, Texas prison for the 1994 rape and murder of a 16-year-old girl, state officials said.

Mexico has long protested the failure of US authorities to inform local consulates when its citizens are arrested for serious crimes.

The International Court of Justice ruled in 2004 that the United States was in violation of its treaty obligations, but it has failed to pass a law requiring local officials to inform foreign nationals of their consular rights.

In a rare intervention, the US government's top lawyer urged the Supreme Court to spare Leal's life, saying his execution would cause "irreparable harm" to US interests.

"This case implicates United States foreign policy interests of the highest order," US Solicitor General Donald Verrilli wrote in an amicus brief to the top court last week.

The execution "would have serious repercussions for United States foreign relations, law enforcement and other cooperation with Mexico, and the ability of American citizens traveling abroad to have the benefits of consular assistance in the event of detention."

Verrilli urged the court to stay Leal's execution until January while a bill concerning consular rights works its way through Congress.

The Supreme Court denied the request for a stay of execution in a 5-4 decision just over an hour before Leal was set to be put to death.

"We decline to follow the United States' suggestion of granting a stay to allow Leal to bring a claim based on hypothetical legislation when it cannot even bring itself to say that his attempt to overturn his conviction has any prospect of success," the court wrote.

At least 132 foreign nationals from 34 countries are on death row in the United States, according to Human Rights Research.

While it's not clear how many have been denied consular access, evidence suggests that police forces routinely fail to notify foreign nationals of their right to seek consular help.

Only one of the 26 foreign nationals executed in the United States since 1988 was informed of their consular rights at the time of their arrests, Human Rights Research said.

Leal, who suffered from brain damage, had maintained his innocence and his defense team has argued that he was convicted with flawed evidence.

His lawyers said the murdered girl was under the influence of drugs and alcohol and died accidentally after falling on a rock when Leal tried to help her after she was raped at a party.

They have also argued that his original court-appointed defense team was "disgracefully inadequate" -- one attorney was twice suspended for ethical violations -- and that Leal would have received far more competent legal representation if he had been granted his consular rights.

"With consular assistance, Mr Leal would likely not have been convicted, let alone sentenced to death," his lawyer Sandra Babcock said prior to the execution.

In his final statement, Leal said he was "sorry for everything that I have done" and asked the victim's family to "forgive me."

"I take the full blame for this," prison officials quoted Leal as saying. "Let this be final and be done."

Amnesty International, the United Nations and several former US diplomats and military commanders had also called for a stay of the execution.

Leal was the 26th person to be executed in the United States so far this year, and the seventh in Texas.

Some 1,260 people have been executed since the death penalty was reinstated in 1976, of which 471 were in Texas, according to the Death Penalty Information Center.

Another 3,248 people are currently on death row in the United States.