LIMA, Peru  — When Rafael Correa, Ecuador’s combative socialist president, decided not to run in his country’s 2017 presidential election, the move was widely interpreted as a tactical retreat.

The strategy, commentators agreed, was to let his protege, Lenín Moreno, keep his seat warm for a single term — and take the blame for the country’s stalling economy — while Correa’s approval ratings recovered ahead of a triumphant return in the 2021 election.

But if that was the plan, it has backfired spectacularly.

Ecuadorans voted overwhelmingly on Sunday to approve constitutional changes that bar Correa from ever becoming president again — and bury significant chunks of his legacy.

According to preliminary results, with 89 percent of ballots counted, 64.3 percent of voters backed a proposal to limit public officials to a single reelection, leaving Correa unable to run again.

The result marks the end of an era in Ecuador, where the 54-year-old Correa has been a towering — and polarizing — figure. It is also the latest in a wave of electoral setbacks for South America’s left-wing populist leaders, including reverses over the past three years in Argentina, Bolivia and Venezuela.

But critics accuse Correa of authoritarianism, including repressive policies toward the media that Human Rights Watch once described as “Orwellian.” Correa also famously allowed WikiLeaks founder Julian Assange to take refuge in the Ecuadoran Embassy in London.

In a televised speech as the referendum result became clear, Moreno talked up the need for national unity, noting: “The confrontation is behind us.”

The referendum also included proposals to reverse two flagship Correa policies that had long infuriated Ecuador’s powerful indigenous movement. One proposal, to roll back mining in urban and protected areas, was approved with 68.9 percent of the vote. Another, to curb oil drilling in the stunningly biodiverse Yasuni National Park, home to some of the last indigenous people living in isolation anywhere in the Amazon, received 67.6 percent.

Paulina Recalde, the head of Quito-based polling firm Perfiles de Opinion, says Correa’s fiery brand of populism, rooted in class confrontation, grew obsolete.

While Correa is just the latest left-wing populist on the continent to lose at the polls, Dawisson Belém Lopes, a professor of international politics at Brazil’s Federal University of Minas Gerais, said South Americans are not turning rightward. Instead, he argued, they are rebelling against leaders perceived to be autocratic, venal and incompetent.

“This kind of messianic politician has stopped succeeding in the region,” he added. “Voters want more responsive public servants and better management.”

Nevertheless, Belém Lopes warned, there remains the lurking danger of “contagion” from the United States. “It is not just historic Latin American strongmen or [Philippine President Rodrigo] Duterte now,” he said. “Trump is also a role model.”