In 2004, President Hugo Chávez of Venezuela and the Cuban leader, Fidel Castro, launched the Bolivarian Alternative for the Peoples of Our Americas, a regional alliance of leftist leaders designed to subvert a hemispheric free trade agreement that the United States had been pushing for a decade.

In the years that followed, Washington’s hope of a trade pact of 34 nations faded, and its clout in the region diminished as voters across much of Latin America put their faith in firebrand politicians who promised to spread the wealth of a commodities boom and topple old elites. The region’s exports to China increased 25-fold between 2000 and 2013, allowing Brazil, Argentina, Venezuela and Bolivia to bankroll generous welfare and social programs that lifted millions from poverty.

But today, Latin America’s leftist ramparts appear to be crumbling because of widespread corruption, a slowdown in China’s economy and poor economic choices. For the most part, leaders failed to create diversified economies capable of withstanding slumps. The welfare and pension programs that kept voters loyal proved unsustainable. Leaders in Venezuela, Ecuador and Bolivia flouted democratic traditions by expanding or eliminating term limits and co-opted independent institutions with networks of patronage.

The region is in its second year of economic contraction. As national treasuries have emptied, voters in Argentina, Bolivia and Venezuela have repudiated populist statesmen at the ballot box. Lawmakers in Brazil recently ousted President Dilma Rousseff to put her on trial for alleged financial trickery. In Venezuela, Mr. Chávez’s successor, President Nicolás Maduro, is fighting for political survival. In Ecuador, President Rafael Correa, a leftist, decided last year not to seek a fourth term as the country’s economic crisis worsened. Cuba, meanwhile, is attempting to build a constructive relationship with the United States.