Mexican President Andrés Manuel López Obrador on Tuesday said he expects to reach a deal with the United States over immigration before Washington carries out its threat to enact punitive tariffs.

U.S. President Donald Trump says he will impose a tariff on all Mexican goods beginning June 10 if Mexico does not halt a surge in immigrants, mostly from Central America, crossing into the United States from Mexico.

López Obrador said he was optimistic. "There are signs that it matters to the U.S. officials that there's a deal," he told his regular morning news conference.

Mexico is preparing an immigration proposal to present to U.S. officials at a meeting scheduled for Wednesday in Washington.

"I think the meeting tomorrow will be important and that there will be a deal before June 10, before this tariff comes into effect," Mexico's president said.

Mexican Foreign Minister Marcelo Ebrard, in Washington for the talks, said he hoped Wednesday's meeting could be a starting point for negotiations. Mexican lawmakers and private sector officials will also be visiting Washington this week to press Mexico's case, he added.

"We're going to find common ground, I think," he said at a news conference.

"We are ready" for negotiations, he added, saying talks so far have been "productive."

The large flows of migrants, many asylum seekers, have long sparked Trump's ire and helped fuel his successful bid for White House amid a campaign promise that he would make Mexico pay for a wall along the southern U.S. border. Efforts to get Mexico or U.S. lawmakers in Congress to fund the barrier have failed.

Last week, Trump threatened a blanket tariff on Mexican imports unless Mexico stopped the waves of Central American migrants seeking to reach the United States.

The move was aimed at pressuring Mexico, but it also spooked global markets and put a joint trade pact between the two countries and Canada further in doubt.

On Monday, Mexican officials vowed to reject a U.S. idea to take in all Central American asylum seekers if it was raised at talks this week with the Trump administration.

FOLLOW NBC LATINO ON FACEBOOK, TWITTER AND INSTAGRAM.