WASHINGTON (AP) — President Donald Trump said he expects to begin hitting Mexico with tariffs next week in a long-running dispute over illegal immigration, while Mexican officials predicted an agreement to avoid the penalties would be reached during upcoming negotiations.

Trump said Tuesday that the parties would try to work something out, but continued to dangle the threat of tariffs to force Mexico's hand.

"We're going to see if we can do something. But I think it's more likely that the tariffs go on," he said from London, where Trump is on the second day of a state visit to Britain. The president commented during a news conference with outgoing Prime Minister Theresa May.

But Mexico said earlier Tuesday that an agreement was likely to avoid the threatened 5% tariff on Mexican imports , effective Monday.

"By what we have seen so far, we will be able to reach an agreement," Mexican Foreign Minister Marcelo Ebrard said during a news conference at Mexico's Embassy in Washington. "That is why I think the imposition of tariffs can be avoided."

Ebrard said his team will be prepared for a non-agreement scenario despite his optimism that a deal will be reached.

Ebrard arrived in Washington over the weekend to meet Wednesday with Secretary of State Mike Pompeo. Mexico calls the potential tariff hurtful to the economies of both countries and useless to slow the northbound flow of Central American migrants.

Trump claimed "millions of people" are entering the U.S. through Mexico and criticized congressional Democrats for not passing new laws.

"But even beyond the laws, Mexico should not allow millions of people to try and enter our country. They could stop it very quickly. And I think they will. And if they won't, we're going to put tariffs on," Trump said.

He added that "I think that Mexico will step up and do what should have been done."

It is unclear what more Mexico can do — and what will be enough — to satisfy Trump because the United States has not presented concrete benchmarks to assess whether the U.S. ally is sufficiently stemming the migrant flow from Central America.

"As a sign of good faith, Mexico should immediately stop the flow of people and drugs through their country and to our Southern Border. They can do it if they want!" Trump tweeted Monday from London.

Trump's Republican allies also warn that tariffs on Mexican imports will hit U.S. consumers, harm the economy and jeopardize the new United States-Mexico-Canada Agreement trade pact that the White House wants Congress to approve this year.

"We need to put our heads together and try to come up with a solution," Texas Republican Sen. John Cornyn warned Monday.

A diplomatic counteroffensive launched by Mexico this week includes a Tuesday meeting of trade negotiator Jesus Seade with U.S. Trade Representative Robert Lighthizer.

The tariff threat comes just as the administration has been pushing for passage of the USMCA, which would update the North American Free Trade Agreement.

Mexico and Canada already started the process of ratifying the deal through their own legislatures.

On Monday, U.S. Commerce Secretary Wilbur Ross met with Mexican Economy Minister Graciela Marquez and U.S. Agriculture Secretary Sonny Purdue hosted his Mexican counterpart Victor Villalobos.

"Mexico needs to be doing everything they can to be good neighbors and help with our humanitarian crisis on the southern border," Purdue said in a statement after meeting with Villalobos.

More From WIBX 950