In 2004, the top judicial body of the United Nations, the International Court of Justice, ordered the United States to review the convictions of Mr. Tamayo and 50 other Mexican nationals whose Vienna Convention rights, it said, were violated and who were sentenced to death in the United States. The international court, also known as the World Court, found that United States courts had to determine in each case whether the violation of consular rights harmed the defendant. In the nine years since the World Court’s decision, no United States court has reviewed the Vienna Convention issues in Mr. Tamayo’s case, said Maurie Levin, one of his lawyers.

Image Edgar Arias Tamayo Credit... Texas State Department of Corrections

In a letter sent to Mr. Perry and the Texas attorney general, Mr. Kerry took the unusual step of weighing in on a state death-penalty case, arguing that Mr. Tamayo’s execution would affect the ability of the United States to comply with the international court’s order in what is known as the Avena case. The World Court’s judgment is binding on the United States, Mr. Kerry wrote, and complying with it ensures that the federal government can rely on Vienna Convention protections when aiding Americans detained abroad.

“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,” Mr. Kerry wrote, describing his concern as a “process issue” that could impact the way Americans are treated overseas. “Our consular visits help ensure U.S. citizens detained overseas have access to food and appropriate medical care, if needed, as well as access to legal representation.”

Mr. Kerry also shared with Mr. Perry and the Texas attorney general, Greg Abbott, a letter sent to him earlier this year by Mexico’s ambassador to the United States, Eduardo Medina Mora, who wrote that “this issue has become and could continue to be a significant irritant in the relations between our two countries.”

Texas officials, including Mr. Perry, have argued that the state is not directly bound by the World Court’s decision and that it is a matter best handled by federal officials and Congress, where legislation ordering the states to comply with the tribunal’s judgment is pending. “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,” Lucy Nashed, a spokeswoman for Mr. Perry, said when asked to respond to Mr. Kerry’s letter.