Image copyright Getty Images Image caption Three women and six children died in an attack in northern Mexico earlier this month

The US will legally designate Mexican drug cartels as terrorist groups, President Donald Trump says.

The move would enable a wider scope of US action. Mr Trump also said he had told Mexico the US was ready to "go in and clear out" the cartels.

In response Mexico's foreign minister said his country would not allow any "violation of national sovereignty".

Earlier this month Mr Trump vowed to "wage war on the drug cartels" after a deadly attack on US citizens in Mexico.

The victims - three women and six children who were Mormons of dual US-Mexican nationality - were killed in an ambush while travelling through a remote area of northern Mexico on 4 November.

Officials said it may have been a case of mistaken identity, but relatives of the victims said the killers must have known whom they were targeting.

After the attack the victims' community, the LeBarons, petitioned the White House to list the cartels as terror groups, saying: "They are terrorists and it's time to acknowledge it."

Media playback is unsupported on your device Media caption President Trump tells Bill O'Reilly about his plan to designate cartels as terror groups

What did Trump say?

Conservative media figure Bill O'Reilly asked President Trump on Tuesday whether he was going to designate the cartels as terror groups and "start hitting them with drones".

The president said: "They will be designated... I have been working on that for the last 90 days. You know, designation is not that easy, you have to go through a process, and we are well into that process."

He added that he had told Mexican President Andrés Manuel López Obrador that the US was willing to launch operations against the cartels inside Mexico.

"I've already offered him to let us go in and clean it out and he so far has rejected the offer but at some point something has to be done," Mr Trump said.

What would the designation mean?

When a group is designated as a terrorist organisation in the US, it becomes illegal for people in the US to knowingly offer support.

Its members are also banned from entering the US. If they are already in the US, they face being deported.

If financial institutions discover they have funds connected to the group, they are required to block the money and alert the US Treasury Department.

Some analysts suggest that the designation could affect the supply of weapons to the cartels from the US.

Media playback is unsupported on your device Media caption Three ways the US is influencing violence in Mexico

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 in the US for the cartels could face much heavier penalties.

Other analysts suggest such a designation could complicate possible Mexican government negotiations with cartels as well as efforts by US agencies and NGOs to support peace moves.

How has Mexico responded?

Foreign Minister Marcelo Ebrard said Mexico had made clear to the US its rejection of any violation of its sovereignty. He also said Mexico was committed to tackling transnational organised crime.

"Mutual respect is the basis for cooperation," Mr Ebrard said.

A foreign ministry statement said Mr Ebrard would discuss the issue with US Secretary of State Mike Pompeo.

Media playback is unsupported on your device Media caption In October Sinaloa cartel gunmen overpowered Mexican security forces in the city of Culiacán

Mexico wants 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 towards the US, the statement said.

On Monday Mr López Obrador told journalists Mexico would not accept foreign intervention against the cartels.

"Our problems will be solved by Mexicans. We don't want any interference from any foreign country," he said.

How powerful are the cartels?

Mexico's brutal drug war claims tens of 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. The attack is believed to have been carried out by the Jalisco New Generation cartel.

Media playback is unsupported on your device Media caption Mexico's drug war: Has it turned the tide?

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.

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 Mexican security forces were so comprehensively outgunned 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 Joaquín "El Chapo" Guzmán was sentenced to life in prison following one of the most high-profile trials in recent US history. 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, the US says.

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