Mexico has taken the rare step of charging a former state prosecutor with treason, alleging that he allowed United States agents to take part in a drug raid on the country’s territory.

The case underscores sensitivities about US involvement in Mexico and concerns about the Latin American country’s sovereignty.

On Wednesday, former Chihuahua Attorney General Cesar Jauregui was accused of permitting US agents to take part in an antidrug operation in the northwestern border state.

Under Mexican law, the federal government must approve the activities of foreign forces on the country’s soil.

But questions emerged about whether the law was being adhered to after two US agents and two Mexican law enforcement officials were killed in a car accident on April 19.

News outlets, citing anonymous sources, reported that the US agents had been collaborating with state law enforcement in the destruction of a drug lab.

Matias Gomez Leautaud, an analyst at the Eurasia Group, a US-based risk consultancy firm, told the news service Reuters that the treason charge “seeks to set a precedent and prevent cooperation between [Mexican] states and the US government without the federal government’s coordination and approval”.

While the administration of President Claudia Sheinbaum has collaborated with the US on issues of crime and insecurity, it has opposed any effort by the US to work directly with Mexican states without federal authorisation first.

In the days after the April car crash, Sheinbaum indicated that her government was not aware that US agents had been involved in a drug operation in Chihuahua.

“Evidently, the military didn’t know there were people participating who weren’t Mexican citizens,” Sheinbaum told reporters at the time.

She called for an investigation into whether state officials had respected Mexico’s constitution and its National Security Law, which govern the involvement of foreign forces on Mexican territory.

The constitution, for example, requires Senate approval for the presence of any foreign troops in Mexico. The country has a long history of US intervention , including multiple military invasions continuing into the early 20th century.

But concerns about the US respecting Mexican sovereignty have risen since US President Donald Trump returned to office for a second term.

Trump has suggested that the US could take unilateral military action in Mexico to address cartel drug-trafficking and violence, and he has characterised Mexico’s government as ineffective in addressing the problem.

“We have to eradicate them,” Trump said of the cartels in March. “We have to knock the hell out of them because they’re getting worse. They’re taking over their country. The cartels are running Mexico.”

In the aftermath of the April crash, conflicting reports emerged about why the two US agents were in the country.

Media identified them as members of the Central Intelligence Agency (CIA), a US foreign intelligence branch with a history of covert operations.

But state officials denied claims that they were involved in a drug bust. In a news release on April 20, Jauregui “ruled out the involvement of foreign personnel” in his state’s drug operations.

Instead, he said that US instructors had been present nearby for a training session about drones. They subsequently requested to join a convoy of Mexican law enforcement personnel to return to the airport, according to Jauregui.

“It is worth explaining what happened, in order to clarify the facts that are causing some confusion,” Jauregui said at the time.

He resigned from his post as state attorney general later that month.

Mexico’s federal Attorney General Ernestina Godoy has since accused Jauregui of permitting foreign agents to participate in operations on Mexican territory without first sharing information with federal officials.

A judge has ordered Jauregui to be held in pretrial detention as the court decides whether there is sufficient evidence to move forward with a criminal case.

Experts say the treason charge he faces is vaguely defined in Mexican law. It broadly covers acts that undermine Mexico’s sovereignty for the benefit of a foreign entity.

Convictions are rare, with the last widely recognised example coming in 1867, when Emperor Maximilian was tried by court-martial and subsequently executed for crimes against Mexico.

Jauregui is a member of the National Action Party, a conservative political movement in Mexico. Sheinbaum, meanwhile, is a leader in the left-wing Morena party.