US President Donald Trump has announced tariffs on all goods coming from Mexico, demanding the country curb illegal immigration into the US.
In a tweet, Mr Trump said that from 10 June a 5% tariff would be imposed and would slowly rise "until the illegal immigration problem is remedied".
Jesús Seade, Mexico's top diplomat for North America, said the proposed tariffs would be "disastrous".
Mr Trump declared a national emergency at the US-Mexico border in February.
He said it was necessary in order to tackle what he claimed was a crisis at the US southern border.
Border agents say they are overwhelmed, but critics say they are mishandling and mistreating migrants.
The US president has long accused Mexico of not doing enough to stem the flow of people, and this is his latest attempt to put pressure on the neighbouring state.
Mr Seade said Mexico "must respond vigorously" if the tariffs - a tax on products made abroad - were brought in.
However, Mexican President Andrés Manuel López Obrador responded by saying he did not want "confrontation".
"I propose deepening our dialogue, to look for other alternatives to the migration problem," he wrote in a letter on Thursday.
During his election campaign and throughout his time in office, President Trump has sought funds to build a wall on the US-Mexico border.
He declared the national emergency at the border in an attempt to divert federal funds for a barrier wall, but a judge blocked his efforts in May.
The White House said on Thursday that the president would use the International Emergency Economic Powers Act to implement the new tariffs on Mexico.
The announcement came the same day that the White House told Congress it planned to pursue a new trade deal with Mexico and Canada.
What did Donald Trump announce?
In a White House statement, Mr Trump said the tariffs would rise by five percentage points each month until 1 October, when the rate would reach 25%.
The tariffs would stay at that level "unless and until Mexico substantially stops the illegal inflow of aliens coming through its territory", he said.
"For years, Mexico has not treated us fairly - but we are now asserting our rights as a sovereign nation," the statement said.
The president also took aim at his Democratic opponents, accusing them of a "total dereliction of duty" over border security.
The Democratic-controlled House of Representatives is taking legal action to halt the Trump administration's efforts to build a border wall, saying it would be a waste of funds and would not stop illegal immigration.
Amid record numbers of migrants crossing the border, the deaths of six sick children in US custody since September have raised questions about the level of care provided by US authorities.
The ramifications of Trump's latest trade war
Andrew Walker, BBC economics correspondent
President Trump's latest tariff proposal is driven by a political issue - which is not to say that previous tariff moves did not have any politics behind them. But it is sure to have financial and economic consequences.
Stock markets in many countries have already registered significant falls. Japanese car makers were among those hit - they have operations in Mexico which will be affected if President Trump does go ahead.
Perhaps he hoped that a welcome side effect would be improved competitiveness for American industry.
Well, half the potential impact for the first stage in the proposed tariffs hikes was wiped immediately by a decline in the value of the Mexican peso, which has the effect of making Mexico a little more competitive, at least until the tariffs come into effect.
There could also be ramifications for the new trade deal between the US, Mexico and Canada. It will probably make the Mexican Congress a lot more wary about approving the accord.
What has Mexico done to tackle migration?
Migrants, most of whom say they are fleeing violence in Central American countries, travel through Mexico on their way to the US, where they hope to claim asylum.
Mr Trump believes they should be stopped long before they reach the border, however.
Police do appear to have been cracking down, with 400 migrants detained in the southern state of Chiapas in April.
President López Obrador used the arrests to emphasise the country was not giving migrants "free passage".
However, he added that it was out of concern for the migrants' safety over anything else.
What will the tariffs affect?
Mexico was the second largest supplier of goods to the US last year, with imports totalling $352bn (£275bn), according to Goldman Sachs.
It is known for agricultural products like avocados and tequila, but the country is also a major manufacturing hub and home to many US companies.
The country produces hundreds of thousands of cars every month, and is also home to technology and aerospace companies. It is one of the G20 economies.
US firms Ford, General Motors, John Deere, IBM and Coca-Cola all operate in Mexico, as well as thousands of other multinationals.
The president's statement comes amid a trade war with China.
After complaining for years about the US trade deficit with China, Mr Trump imposed tariffs on hundreds of billions of dollars worth of goods coming from the country.