Mr. Trump was at his Mar-a-Lago estate in Palm Beach, Fla., last year when he ordered missile strikes in Syria in response to a chemical attack by government forces. And in 2011, President Barack Obama went ahead with a trip to Brazil while American forces were striking Libya. But White House officials argued that Mr. Trump felt strongly about remaining on United States soil as the situation in Syria unfolded.

The decision appeared to have taken even some senior White House officials by surprise. Mr. Trump’s top economic adviser, Larry Kudlow, was unaware of the president’s new plans when he told a conservative radio host on Tuesday morning that he would be traveling with Mr. Trump to Latin America this week. He said Mr. Trump would be able to “compartmentalize.”

There were plenty of reasons for Mr. Trump to dread the trip to South America, which promised to include considerable behind-the-scenes friction and little of the flattering pomp and ceremony that he relishes — and to which he was treated during visits last year to Saudi Arabia and China.

The president’s approval rating in Latin America is extraordinarily low, and leaders there have been insulted by his anti-immigrant talk and alarmed by his threats to use military force in Venezuela. The White House had already scaled back Mr. Trump’s trip, trimming what was initially intended as a five-day visit to one that involved fewer than three days on the ground.

Mr. Trump had planned to use that brief time to seek consensus on how to handle the crisis in Venezuela and press his case for better trade deals with Latin American nations. The president’s advisers had played down expectations for major advances during the trip, including saying it was unlikely to produce any breakthroughs on the renegotiation of the North American Free Trade Agreement.

They had left open the question of whether Mr. Trump would meet with President Enrique Peña Nieto of Mexico, with whom he has had a stormy relationship. The two have clashed on the phone over Mr. Trump’s promises to build a border wall and force Mexico to pay for it, and the latest such altercation led them to cancel a tentatively planned visit by Mr. Peña Nieto to the White House in March.

More recently, Mr. Peña Nieto has taken umbrage at Mr. Trump’s decision last week to send National Guard troops to patrol the southern border.