A brighter future for struggling Latin Americans, ultimately, will require leaders who are accountable to their citizens.

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.

The shifting political landscape has opened the door for a new generation of leaders to chart a different course for Latin America. That offers the United States an opportunity to jump-start its relationship with several neighbors that have historically regarded Washington as neglectful, imperial — or both.

New governments in Argentina and Brazil, for instance, are more open to expanding cooperation with the United States than they’ve been since the turn of the century. Although Washington is no longer eager to sign new trade deals — a lightning rod in the 2016 presidential race — it would be foolish not to seize on these possibilities.

The United States can help its neighbors become more competitive and stable by promoting investment in technology, innovation and high-quality education. It can point to the security turnaround of Colombia, which has one of the growing economies in the region, as evidence of the potential of sustained security partnerships. Washington can do more to help Central American and Caribbean nations find sustainable sources of energy, now that they can no longer count on subsidized oil from Venezuela. It also can support anticorruption initiatives that citizens around the hemisphere are clamoring for.

Yet, a brighter future for struggling Latin Americans cannot depend on the United States. Ultimately, that will require leaders who are accountable to their citizens, are willing to invest in long-term prosperity rather than their political brands and stand ready to acknowledge the colossal mistakes of their predecessors.