Top military leaders, lawyers, diplomats and former government officials have joined forces to protest against the pending execution of a Mexican citizen in Texas which they say would be in breach of international law and could put American lives abroad at risk.

The governor of Texas, Rick Perry, has vowed to press ahead on 7 July with the execution of Humberto Leal Garcia, despite condemnation across the political and legal realms. Presidents George Bush and Barack Obama have, while in office, opposed the execution, and Congress is likely to soon introduce legislation designed to make such a judicial killing impossible.

The almost blanket condemnation of Texas's position stems from the fact that Leal was prosecuted without the benefit of consular support and advice from the Mexican authorities, as is required under the Vienna Convention on Consular Relations. He was found guilty in 1994 of sexually assaulting and murdering a 16-year-old girl in San Antonio.

But the Mexican authorities were never informed of his arrest, and at his trial he was assigned court-appointed lawyers whom his current attorneys say were unprepared and incompetent. One of the trial lawyers has twice been suspended from practising law and reprimanded two other times for failing to carry out his obligations to his clients, according to the attorneys.

In a clemency petition lodged with the Texas governor on Tuesday, Leal's current lawyers argue that had Leal had consular access, he could have avoided conviction, let alone a death penalty. "The complete failure of Mr Leal's attorneys to represent their client in any meaningful way deprived him of his chance for a fair trial," the petition says.

Joint letters have been sent to Perry's office to accompany the petition, whose signatories include prominent figures in the worlds of law, diplomacy and the military.

One letter comes from former US diplomats and top officials in the state department, among whom are the top legal adviser to the state department under Bush, John Bellinger, and the former US ambassadors to the UN and Nato, Thomas Pickering and William Taft respectively.

In their joint letter, the diplomats argue that by failing to honour the rights of foreign nationals arrested in the US, Texas is putting at risk those of American nationals arrested abroad. "We believe that continued non-compliance will surely alienate this nation from its allies."

Top retired military figures including Rear Admiral Don Guter, Brigadier James Cullen and Colonel Lawrence Wilkerson warn in a separate letter that, by disregarding the Vienna Convention, Texas is also putting at risk military personnel stationed overseas. "As retired military leaders, we understand that the preservation of consular access protections is especially important for US military personnel, who when serving our country overseas are at greater risk of being arrested by a foreign government."

A complementary letter from former top judges includes among its signatories William Sessions, director of the FBI between 1987 and 1993.

Leal is one of 40 or so Mexican nationals in a similar legal trap; individuals who are awaiting execution in the US, despite having consular access withheld at the time of their arrest and trial. Under the Vienna Convention, those facing prosecution in a foreign country must be given regular access to their consular representatives.

Though that legal point has been pressed by the US on many occasions in cases where American citizens have been arrested abroad, Texas has decided to press ahead with the execution regardless.

The US supreme court sided with the state, and the only way that Texas can be forced to budge its position is if Congress enforces adherence to the Vienna Convention with new legislation.

Such a bill is expected to be introduced to the US senate within the next two weeks, but it is unlikely to pass all stages in both houses before the 7 July execution date.