Mexican President Andrés Manuel López Obrador speaks during his morning press conference at the National Palace in Mexico City, on May 31, 2019.

Mexico's president on Saturday hinted his country could tighten migration controls to defuse U.S. President Donald Trump's threat to impose tariffs on Mexican goods, and said he expected "good results" from talks planned in Washington next week.

Trump said on Thursday he will apply the tariffs on June 10 if Mexico does not halt the flow of illegal immigration, largely from Central America, across the U.S.-Mexican border.

His ultimatum hit Mexican financial assets and global stocks, but met resistance from U.S. business leaders and lawmakers worried about the impact of targeting Mexico, one of the United States' top trade partners.

In a news conference in the Gulf of Mexico port of Veracruz, President Andres Manuel Lopez Obrador said Mexico could be ready to step up measures to contain migration in order to reach a deal with the United States.

A Mexican delegation led by Foreign Minister Marcelo Ebrard will discuss the dispute with U.S. officials in Washington on Wednesday, and Lopez Obrador said he expected "good results" from the talks, and for a deal to emerge.

"The main thing is to inform about what we're already doing on the migration issue, and if it's necessary to reinforce these measures without violating human rights, we could be prepared to reach that deal," Lopez Obrador said.

Trump's threat to inflict pain on Mexico's economy is the biggest foreign policy test to date for Lopez Obrador and a tall order for Mexican authorities struggling not only to contain migration but also to fight record gang violence.

Mexico's economy relies heavily on exports to the United States and shrank in the first quarter. Under Trump's plan, U.S. tariffs that could rise as high as 25% this year.

Lopez Obrador said Mexico would not engage in any trade wars with the United States, but noted that his government had a "plan" in case Trump did apply the tariffs to ensure the country was not impoverished. He did not provide details of the plan.