The US has confirmed its intention to cut more than $450 million in aid to Guatemala, Honduras and El Salvador, as Donald Trump accused the three Central American countries of “arranging” migrant caravans to the US.

Trump relented on his earlier vow to close the entire southern border with Mexico, claiming that the security forces there had begun arresting “a lot of people” in response to his closure threat. But he warned that if the Mexican authorities did not “keep it up” he would seal the frontier, no matter what the economic cost to the US.

The Mexican prosecutor’s office said on Monday that 338 Central American migrants on their way north in five buses had been “rescued” by police. The country’s foreign minister, Marcelo Ebrard, however, said that Mexico would not “act on the basis of threats”.

Meanwhile, the president on Tuesday appeared determined to punish the three “Northern Triangle” countries for what he portrayed as their active involvement in the northward exodus of migrants.

The state department, which was caught unawares by the president’s announcement, said on Tuesday that it would affect $450 million for the three countries in the 2018 budget while officials were still evaluating how much of the funding in the 2017 budget could be cut off now. Another half billion in aid earmarked in the 2019 budget could also be eliminated.

The state department contacted congressional committees over the weekend, alerting of the directive to cut off aid to the region.

“They were clearly scrambling, trying to adjust US policy based on the president’s outburst,” a Senate staffer said.

Democrats said they would do everything in their power to stop it happening, but Congress has limited power to specify where aid money should be spent.

The state department spokesman, Robert Palladino, did not answer a question on whether its officials had been given prior notice of Trump’s announcement.

“The president’s decision is clear and the secretary of state has ordered us to march forward,” Palladino said.

Aid experts warn that the proposed cuts would most immediately effect US efforts to strengthen the rule of law and contain gang violence, which is one of the main drivers of the migrant exodus.

On Tuesday, however, Trump maintained that the aid money was being misspent, and went further, accusing the Northern Triangle governments – without evidence – of deliberately organising the northbound convoys and filling them with citizens they did not want.

“We’re giving hundreds of millions of dollars to these three countries,” Trump said. “I know what the payments are supposed to … help so that they don’t have this problem, but they don’t do that … It’s not spent properly. And they arrange … these caravans. And they don’t put their best people in those caravans, they put people in there that you don’t want in the United States.”

Jeremy Konyndyk, a former senior US aid official, said it was likely that cut in aid would only accelerate the migrant flow from Central America. He pointed out that remittances sent back to the Northern Triangle countries by migrant workers amounted to $14.3bn in 2016, while US aid in the same period was only $323m, which represented less than 0.3% of the GDP of the three countries.

However, Konyndyk, said US aid was concentrated on efforts to combat gangs and corruptions, the twin blights of the region. Hamstringing those efforts would only contribute to the violence from which many migrants are fleeing.

“It is utter foolishness,” he said. “It reduces our ability to do anything about the violent drivers of migration.”

Adam Isacson, director for defence oversight at the Washington Office on Latin America, said: “These countries have an out-of-control gang problem, and their anti-gang units are on the verge of being lost to corruption and the torrent of drugs of drugs coming through there.

“This is going to cut off all their anti-gang units that you have vetted and trained, so these countries are going to be much more susceptible to gang violence,” Isacson said. “There is the question of whether they made much of a difference, and well – now we are going to find out. The risk is that these units will go off to the other side.