President Donald Trump says the United States will impose a five per cent tariff on all goods coming from Mexico, starting on June 10.

He said on Thursday the tariff would remain until illegal immigration is stopped.

“The Tariff will gradually increase until the Illegal Immigration problem is remedied, at which time the Tariffs will be removed,” Trump said on Twitter.

Trump said the tariff would start rising from July 1 until reaching 25 per cent on October 1, where it would remain until Mexico had “solved this problem”.

Trump has accused the Mexican government of failing to crack down on the surge of Central American migrants who have been flowing to the US in search of asylum from countries such as El Salvador, Honduras and Guatemala.

The announcement comes as the Trump administration has been pushing for passage of the United States-Mexico-Canada Agreement that would update the North American Free Trade Agreement.

During a visit to Canada on Thursday, US Vice President Mike Pence vowed the USMCA deal would be passed this year.