The result distances Ecuador’s electoral system from those of neighbors like Venezuela and Bolivia, where the left-wing leaders Evo Morales and Nicolás Maduro have entrenched themselves in power while still holding elections. Instead, Ecuador’s system moves closer to Colombia’s, which limits presidents to a single four-year term, and Peru’s, which allows re-election only if the terms are nonconsecutive.

The steps taken by Mr. Correa, who was in power from 2007 to 2017, in hopes of allowing himself a potential fourth term were a stark contrast to the decade preceding his election to the top office, when the country had cycled through seven presidents in a period of political turmoil.

Mr. Moreno can still seek a second term, because the Constitution allows one re-election.

Mr. Correa, who had been living in his wife’s native Belgium since last summer, returned to Ecuador last month to take an active role in campaigning against the referendum, calling it a “coup d’état” that would end “the rule of law” in the nation.

As he toured the country during the campaign, voters threw tomatoes and eggs at him on several occasions. In the western city of Quinindé, he had to be evacuated by helicopter after rocks and trash were thrown at his car — violence that Paola Pabón, a former senior official under Mr. Correa, charged was part of an effort led by Mr. Moreno to undermine his rival.

For his part, Mr. Correa said he considered the referendum a campaign against his political legacy. “They’re trying to destroy everything that has to do with Correa,” he told Reuters ahead of the vote.