President Trump in the Oval Office of the White House on Tuesday. (Mark Wilson/Bloomberg News)

PRESIDENT TRUMP’S decision to skip the Summit of the Americas this week came at a particularly bad time. Held eight times since 1994, the gathering is the most important in the Western Hemisphere, and in the past it has given U.S. presidents a chance to exercise leadership. The White House had hoped to rally support for firmer action on the political and economic implosion of Venezuela. Now that effort will probably be stillborn — and Mr. Trump’s already poor image in Latin America will be further tarnished.

Venezuela is not the only country where greater U.S. attention is needed. Peru, the host of the summit, just lost its relatively capable president, Pedro Pablo Kuczynski, who resigned while facing impeachment, nominally because of his connection to a continent-wide corruption scandal involving a Brazilian construction company. Brazil’s own political system, meanwhile, suffered another shock last week when a judge ordered former president Luiz Inácio Lula da Silva to begin serving a prison sentence even though he leads by a wide margin in polls for the next presidential election in October.

Defiant at first, Mr. Lula headed off a political crisis and possibly civil chaos by reporting to prison. But his detention places Brazil’s liberal institutions in conflict with each other. Supporters say the courts have gutted the election of legitimacy by imprisoning the leading candidate, a leftist who served two terms between 2003 and 2011. But many other Brazilians are cheering what they see as a victory for the rule of law and for a painful but needed campaign by judges against rampant political corruption.

Both arguments have some merit. Mr. Lula has hardly been singled out: More than 120 people have been convicted in the corruption investigations since 2014, including senior members of Brazil’s National Congress and a state governor. The evidence against the former president, which was upheld by a three-judge appeals court, is persuasive. He accepted a seaside apartment in exchange for steering a construction contract; more broadly, he oversaw a huge system of kickbacks to politicians and political parties. Six more cases are pending against him.

At the same time, Mr. Lula’s apparent elimination from the presidential race leaves the left leaderless and could prompt millions of voters to boycott the election. The beneficiary could be a right-wing populist, Jair Bolsonaro, who has scandalized the political establishment with offensive rhetoric and praise for Brazil’s past military rulers. Mr. Bolsonaro is often compared with Mr. Trump, but his election would be unlikely to improve the cool relations between the two countries.

Brazilians, like people across Latin America, have been offended by Mr. Trump’s gibes at immigrants and his threats to break free-trade treaties. Polling by Gallup put his approval rating in the region at 16 percent. An appearance at the summit and some effort to support the causes of fighting corruption and preserving democracy could have helped. Instead, Mr. Trump has dealt another blow to U.S. standing in the hemisphere.