Mexico’s president has rejected any US intervention in his country, after President Donald Trump said US forces were willing to “go in and clear out” drug cartels.

“Co-operation, yes; intervention, no,” Andrés Manuel López Obrador said in response to Mr Trump’s comments.

The US president announced in a Tuesday interview he would legally designate Mexican drug gangs as terrorist groups.

Earlier this month nine US citizens were killed in an ambush in Mexico.

The victims – three women and six children who also had Mexican nationality – were killed while travelling through a remote area in the north of the country.

After the attack, the victims’ Mormon community – the LeBarons – petitioned the White House to list the cartels as terror groups.

The legal move outlined by Mr Trump would enable a wider scope of action against them.

Speaking at a news conference in Mexico City on Wednesday, President López Obrador said Mexicans “had nothing to fear” and that the foreign minister, Marcelo Ebrard, would address the issue after the US Thanksgiving holiday on Thursday.

On Twitter, Mr Ebrard said he was already in contact with US authorities and that his efforts would be focused on “defending [Mexico’s] sovereignty and its own decisions”.

Earlier, he said Mexico “would never accept” any violation of its sovereignty and that the government was committed to tackling transnational organised crime, adding: “Mutual respect is the basis for co-operation”.

In the interview, President Trump told conservative media figure Bill O’Reilly, a former Fox News host, that he had been working on the process of designating the drug cartels as terrorist organisations “for the last 90 days”.

He added that he had told his Mexican counterpart that the US was willing to launch operations against the cartels inside Mexico. “He so far has rejected the offer,” Mr Trump said, “but at some point something has to be done”.

What would the designation mean?

When a group is designated as a terrorist organisation in the US, it becomes illegal for people in the country to knowingly offer support. The group’s members are also banned from entering the US and, if they are already in the country, they face being deported.

If financial institutions discover they hold funds connected to the group, they are required to block the money and alert the US Treasury Department. Some analysts suggest the designation could affect the supply of weapons to the cartels.

Earlier this year a US government study traced more than 150,000 firearms, including assault rifles, back from Mexican criminals to gun shops and factories in the US. Under anti-terror laws, those who purchase the guns for the cartels could face much heavier penalties.

Other analysts suggest the designation could complicate possible Mexican government negotiations with cartels as well as efforts by US agencies and organisations to support peace efforts.

In an earlier statement, Mexico’s foreign ministry said the country wanted measures to reduce the flow of weapons and money from the US to the cartels as well as efforts to stop the movement of drugs across its territory and over the US border.

How powerful are the cartels?

Mexico’s brutal drug war claims thousands of lives every year, as powerful trafficking groups battle for territory and influence. In 2017 more than 30,000 people were killed in the country, with the murder rate having more than tripled since 2006.

The cartels control vast areas and are also responsible for political corruption, assassinations and kidnappings. Earlier this week at least 13 police officers were killed in an ambush in the western state of Michoacán in an attack believed to have been carried out by the Jalisco New Generation cartel.

In a now-notorious incident in October, hundreds of gunmen from the Sinaloa cartel overpowered security forces in the Sinaloa state capital, Culiacán, taking troops hostage and eventually forcing the government to release a captured cartel leader, Ovidio Guzmán, son of former drug lord Joaquín “El Chapo” Guzmán.

President López Obrador has opted for a non-confrontational approach to the cartels, instead making tackling inequality central to his efforts under a policy dubbed “abrazos, no balazos” – hugs not bullets.

But this policy has come in for criticism after what happened in Culiacán. The US government has described the Sinaloa Cartel as one of the largest drug-trafficking organisations in the world.

In July its former leader “El Chapo” Guzmán was sentenced to life in prison in the US. But the group continues to make billions of dollars from trafficking illicit narcotics to the US, Europe and Asia, experts say.

Meanwhile the Jalisco cartel is believed to have assets worth more than $20bn (£15.5bn) and is one of the main distributors of synthetic drugs on the continent.

It has gained notoriety for attacks on security forces and public officials, including the downing of an army helicopter with a rocket-propelled grenade.