By Katie Rogers, Zolan Kanno-Youngs and Michael D. Shear, New York Times–

President Trump said on Friday that there would be a “very good likelihood” that he would seal off the United States border with Mexico next week, even as he moved to punish Guatemala, Honduras and El Salvador for migrant caravans by cutting off all foreign aid to the countries.

The moves escalated a sustained berating of countries he blames for being unable to stop the flow of migrants trying to make their way north.

“I will close the border if Mexico doesn’t get with it,” Mr. Trump said to reporters who had gathered at Mar-a-Lago, his winter retreat in Florida. “If Mexico doesn’t stop it.”

At Mr. Trump’s direction, the State Department on Friday began the process of informing Congress that it intended to end the foreign aid. A person with knowledge of the decision said that Mr. Trump met with Secretary of State Mike Pompeo on Thursday, after which diplomats were directed to begin the process of cutting off the funds by drafting letters to lawmakers. Mr. Trump publicly said as much on Friday in comments to reporters.

“No money goes there anymore,” Mr. Trump said. “We’re giving them tremendous aid. We stopped payment.”

The State Department issued a statement late on Friday saying: “At the secretary’s instruction, we are carrying out the president’s direction and ending FY 2017 and FY 2018 foreign assistance programs for the Northern Triangle. We will be engaging Congress as part of this process.”

Mr. Trump has threatened to close off the border and cut off aid to the three countries — known as the Northern Triangle — several times before and has not followed through.

But his comments on Friday signaled a new escalation and a diplomatic assault on America’s neighbors in the hemisphere as his administration confirmed that it would review ways to reshuffle Border Patrol agents, shut down traffic lanes and close ports of entry at the southwest border. He began the day with a morning tweet saying that he would close the border “next week,” and then told reporters that he was prepared to close off trade and commercial ports of entry.

A full or partial sealing of the border would effectively close off the United States from one of its largest trading partners, but it could leave American citizens who cross back and forth with a sluggish or potentially nonexistent system of returning to the United States.

“I’m not playing games,” Mr. Trump said on Friday, as he threatened to close the border with Mexico.

The president has been emboldened since the release of a report by the special counsel, Robert S. Mueller III, found that his campaign had not cooperated with the Russian government. And a partisan upholding of his national emergency declaration over a wall along the southwestern border has prompted Mr. Trump to ratchet up harsh words against immigration as he seeks to galvanize supporters ahead of the 2020 presidential election.

As he engaged in multiple photo opportunities throughout the day, Mr. Trump’s actions and comments indicated that his mind was not on the scenes at hand but on immigration.

“How are we doing at the border?” he asked a military official on a tour of Lake Okeechobee, the site of a restoration project in the central part of the state. During a meeting at Mar-a-Lago to announce that Linda McMahon, who has led the Small Business Administration, had resigned, he again turned to immigration.

“We have the most laughed-at immigration laws of anywhere in the world,” Mr. Trump said to reporters as he and Ms. McMahon sat in the ornate front room of the club. “They’re the Democrats’ laws, and I got stuck with them.”

Mr. Trump’s decision to end the aid to the Central American countries is likely to anger members of Congress from both parties, who have supported spending money to try to address the root causes of the violence that has caused migrants to flee those countries to come to the United States.

Currently, the United States spends about $620 million a year for gang prevention programs and other initiatives aimed at helping support civil society in the three countries. Advocates say that cutting the funds will only accelerate the migrant flows into the United States.

But the president has repeatedly expressed anger that the United States sends money to the countries even as caravans of migrants make their way to the border.

In an email from the director of the Office of U.S. Foreign Assistance Resources on Friday night, senior State Department and United States Agency for International Development officials were instructed to “redirect” all 2018 assistance “away from these countries” and to “cease and desist” all 2017 spending already started.

The email sent State Department officials scrambling to carry out the president’s order. It was unclear how quickly the funding would cease since the governments had not yet been notified formally of the decision.

It is also unclear whether the department can redirect all of the money to other parts of the world. Some of the money meant for the 2017 fiscal year has already been allocated to specific contracts, so it might not be able to be withdrawn, according to a person familiar with the effort.

Mr. Trump told reporters that he would consider shutting down ports along the border, a decision that could imperil the transit of goods between the United States and Mexico. According to government figures, Mexico is the United States’ third-largest goods trading partner, with $557.6 billion worth of products flowing across the border in both directions.

A move by Mr. Trump to shut down or drastically curb trade with Mexico would pose significant risks to the American economy. It would also represent a stunning reversal in trade relations between the two countries, which last August put their differences aside to renegotiate their portion of the North American Free Trade Agreement. The new deal, known as the United States-Mexico-Canada Agreement, still needs to be approved by Congress.

The president lamented that Mexico was making a “fortune” off the United States, and said Mexico’s immigration laws were the “strongest immigration laws of anywhere in the world.” (Mexico is much weaker than the United States at enforcing its border laws.) Mr. Trump also again invoked migrant caravans — including one containing hundreds of people heading to the United States — as a reason Mexico needed to act.

“Mexico is tough,” Mr. Trump said. “If they don’t stop them, we’re closing the border.”

Americans would feel the effects in other ways. Border control agencies are already reviewing ways to slow down immigration processing at the border. A senior homeland security official confirmed on Friday that shutting down ports of entry along the southwest border was “on the table” to handle the surge in migrants seeking asylum.

Kirstjen Nielsen, the homeland security secretary, said in a statement that she had asked volunteers to add more support at the border, and suggested that American citizens may encounter difficulty getting through as a result.

“Make no mistake: Americans may feel effects from this emergency,” Ms. Nielsen said. “As personnel are reallocated to join the crisis-response effort, there may be commercial delays, higher vehicle wait times at the border and longer pedestrian lines.”

She added that “despite these impacts, we cannot shirk our responsibility to the American people to do everything possible to secure our country while also upholding our humanitarian values.”

Stephen H. Legomsky, a law professor at Washington University in St. Louis, said there were a few options available to Mr. Trump if he wanted to move to stop the flow of people at the border, including slowing down processing at ports of entry. The administration has already limited the number of migrants who can apply for asylum each day.

“He could pretend that this was necessary in the interest of national security,” Mr. Legomsky said, “and it could be that the courts would be hesitant to second guess a national security claim by a president.”

Mr. Legomsky said putting up trade roadblocks and slowing down the processing of people would have harmful effects, both on American citizens who could find themselves “marooned” in Mexico and on families, including groups of women and children, who are fleeing violence and poverty.

“There’s a huge humanitarian concern,” Mr. Legomsky said. “So many of the people are these Central American mothers and children fleeing from high levels of violence. They would be effectively stuck in the border areas which are also extremely dangerous.”

On Thursday, the president said that he did not share concern over the plight of people in danger. In front of supporters at a rally in Grand Rapids, Mich., he used harsh language to describe the thousands of people who have tried to flee violence and poverty, calling the problem an “invasion” and referring to asylum seekers as a “big fat con job.”

In a news conference in El Paso on Wednesday, Kevin McAleenan, the commissioner of Customs and Border Protection, said that an influx of migrants had reached a “breaking point.”

In February, there were 76,000 crossings at the border, which marked an 11-year high and signaled that the Trump administration’s harsher policies have not stopped the flow of people trying to enter the country.

The threat to close the border is one that Mr. Trump has made previously but not carried out. But he has not yet attached a deadline by which he would take such a drastic measure, and did not respond to reporters who asked on Friday whether he would set one.

The homeland security official said the Trump administration had not yet decided to shut down a major port, but that the department had been forced to divert agents from ports of entries and interior checkpoints to handle large groups of migrants trying to illegally come into the United States, including families.

Katie Rogers reported from Palm Beach, Fla., and Michael D. Shear and Zolan Kanno-Youngs from Washington. Alan Rappeport contributed reporting.

A version of this article appears in print on , on Page A21 of the New York edition with the headline: President Renews Threat To Close Mexican Border. Order Reprints | Today’s Paper | Subscribe