According to USA media, if Mexican cartels are designated as terrorist organisations, the United States would be able to freeze cartel assets and expel cartel members and associates from the country.
Ebrard said that in the event drug gangs were designated as terrorists it could, under US law, enable the United States to act directly against the threat if it so chose.
That insulted national pride in Mexico, which resents a long history of armed interventions by its giant northern neighbour, and where Trump's comments have been taken as a threat of armed cross-border operations.
"If we reduce drug use, we are going to be able to resolve the serious problem of insecurity and violence", said Lopez Obrador. "In the unlikely case that a decision is taken that we consider affects our sovereignty, then we will act within the framework of global law, but I see it as unlikely", the president said.
U.S. Attorney General William Barr will visit Mexico next week to discuss further security cooperation, Mexico's foreign minister said earlier. Lopez Obrador was elected in 2018 on a "strategy for peace" and promises of amnesty to non-violent cartel members.
The country has registered more than 250,000 murders since deploying the army into the streets, including an all-time high of 33,743 last year - a record that looks set to be broken again this year.
'I don't think the United States will pursue this path because we're working together, and I don't think they would want to open up the possibility of Mexico invoking the same legal principles, ' Ebrard told reporters.
Mexican officials have had several meetings with USA counterparts to discuss how to stop the arms flow, it said, adding that "satisfactory" progress has already been made.
Some U.S. security officials have said they find it harder to work with Lopez Obrador's government than with previous administrations.
Latin America's No. 2 economy depends heavily on access to the USA marketplace to fuel growth, and the government is eager for US and Canadian lawmakers to approve a new trade deal known as the United States-Mexico-Canada Agreement (USMCA). Mexico lost more than half its territory to the United States in 1848 after the Mexican-American War - just one on a long list of grievances. He urged Mexico to join him in wiping out the drug cartels.