Mexican Foreign Affairs Secretary Marcelo Ebrard holds a news conference at the Mexican embassy following talks with U.S. Vice President Mike Pence and Secretary of State Mike Pompeo June 5, 2019 in Washington, DC.

Mexico's government will consider legislation to accommodate U.S. demands to make Mexico a so-called safe third country for asylum seekers if it cannot stem migration flows in 45 days, Mexico's foreign minister Marcelo Ebrard said on Tuesday.

Ebrard said Mexico had agreed to consider a change in its legislation during talks with U.S. officials last week to avert the threat of U.S. tariffs on Mexican goods.

Mexico had resisted U.S. demands to become a safe third country, which would oblige migrants to seek asylum in Mexico if they passed through the country on the way to the United States.