Texas is preparing to execute a Mexican national despite warnings that his death could harm relations between the United States and Mexico and affect the treatment of Americans detained abroad.

Edgar Arias Tamayo is scheduled to die by lethal injection in a Texas prison on 22 January for the 1994 murder of a Houston police officer. Tamayo was not promptly informed after his arrest of his right to consular assistance – a violation of the Vienna Convention on Consular Relations.

US and Mexican government officials have cautioned Texas that executing Tamayo without a review of his case would breach an order from the International Court of Justice (ICJ). John Kerry, the US secretary of state, fears that if America is seen to be flouting international law there is a danger that other countries will be less inclined to respect due process for its citizens.

The case has attracted considerable publicity in Mexico, and several of the country's politicians have called on Texas to delay the execution. Mexico's foreign affairs secretary, José Antonio Meade Kuribreña, last month sent letters to the Texas governor, Rick Perry, and the Texas board of pardons and paroles requesting a reprieve.

At a press conference last week, Eduardo Medina Mora, the Mexican ambassador to the US, demanded that the US comply with international law and said Mexico had done "everything in its power" to halt the execution.

Kerry wrote to Perry last September urging Texas to delay setting an execution date because it would be "extremely detrimental to the interests of the United States" and risk "jeopardizing the US relationship with our allies and our ability to provide consular assistance to US citizens abroad".

Kerry added: "I have no reason to doubt the facts of Mr Tamayo's conviction, and as a former prosecutor, I have no sympathy for anyone who would murder a police officer. This is a process issue I am raising because it could impact the way American citizens are treated in other countries."

That appeal followed a letter to Kerry from Mora in which he warned that America's failure "to provide the mandated review and reconsideration of the convictions and sentences of Mexican nationals whose cases were addressed by the ICJ … has become and could continue to be a significant irritant in the relations between our two countries".

Mora wrote: "If carried out, Mr Tamayo's execution will mark the third time that the US has breached its international legal obligations under the ICJ's decision. Should this happen, our whole forward-looking bilateral engagement could be questioned on the grounds of the US inability to live up to its treaty obligations."

The 'Avena decision'

The ICJ, the main judicial body of the United Nations, ruled in 2004 that the US had breached its obligations under the Vienna Convention by failing to inform Mexican consulates immediately after the arrests of about 50 Mexican nationals, including Tamayo. Nor, in many instances, were the nationals promptly told of their right to consular assistance.

As part of what is often dubbed the "Avena decision", the ICJ ordered the US to review and reconsider the convictions and sentences to decide if they had been influenced by the violations of consular rights.

In 2005, President George W Bush determined that state courts should comply with the ICJ. However, Texas disagreed. Three years later the US Supreme Court ruled in a case known as Medellín v Texas that although the Avena decision is a binding obligation under international law, without a statute from Congress the president does not have the power to force states to comply with ICJ rulings.

Texas's right to assert its authority over international law was argued before the supreme court by Ted Cruz, then the state solicitor general, who trumpeted the victory during his successful 2012 Senate campaign.

Ted Cruz featured his supreme court victory in his 2012 Senate campaign in 2012

In 2008 Governor Perry wrote to Condoleezza Rice and Michael Mukasey, then US secretary of state and attorney general respectively, pledging that "if any individual under Texas custody and subject to Avena has not previously received a judicial determination of his claim of prejudice under the Vienna Convention and seeks such review in a future federal habeas proceeding, the State of Texas will ask the reviewing court to address the claim of prejudice on the merits."

The office of Greg Abbott, the current Texas attorney general, echoed Perry's words in a submission to the supreme court. But no court has ever reviewed Tamayo's claim, according to his lawyers, who accuse Abbott and Perry of failing to keep their promises.

Abbott's office argued last month in a letter to Tamayo's lawyers that the state met its pledge during a hearing at an appeals court in 2011 – an assertion Tamayo's team firmly rejects. Abbott is bidding to replace Perry when he steps down after this November's gubernatorial election.

"The governor’s letter speaks for itself. The attorney general is handling this legal matter. It doesn’t matter where you’re from – if you commit a despicable crime like this in Texas, you are subject to our state laws, including a fair trial by jury and the ultimate penalty," said Lucy Nashed, a spokeswoman for Perry.

"Tamayo is the first Mexican national facing execution who has never received any review whatsoever of the prejudice, the harm [that came from the violations]," one of his lawyers, Maurie Levin, told the Guardian.

Tamayo's lawyers filed a federal lawsuit on Tuesday seeking a temporary restraining order and preliminary injunction that aims to stop Perry and the Texas board of pardons and paroles from deciding Tamayo's request for clemency until the procedure is "adequate and fair".

'Brain-damaged'

Now 46, Tamayo, who had entered the US illegally, was convicted of shooting Guy Gaddis, who was taking him to jail shortly after apprehending him on suspicion of robbery.

His lawyers claim that Mexico learned of the arrest by chance only a week before the trial. They say that consular investigations revealed that he is intellectually disabled and brain-damaged, with an IQ of 67, but this discovery came too late to have an impact on the trial. Had Mexico been informed of Tamayo's arrest earlier, they argue, he might have been able to mount a stronger defence and received life in prison instead of death.

Tamayo would be the third Mexican referenced in Avena to be executed in Texas, following José Medellín and Humberto Leal García, who was put to death in 2011 despite efforts from the US and Mexican governments to stay his execution because he was denied timely consular rights.