Bolivian voters have handed Evo Morales his first electoral defeat as president, rejecting by a slim margin a constitutional amendment that would have let him run for a fourth consecutive term in 2019.
After the announcement by electoral officials Tuesday night, celebrants poured into the streets in the eastern city of Santa Cruz, where opposition to Morales is strong. But fireworks also sounded in La Paz, where there is weariness of corruption in the governing party.
The ballot measure in Sunday's referendum was voted down 51 per cent to 49 per cent, with 99.5 per cent of the ballots counted, a margin of just over 150,000 votes. The outcome also blocks Vice-President Alvaro Garcia from running again.
Morales is Bolivia's first indigenous president and he helped lift millions out of poverty since first taking office a decade ago by more equitably distributing natural gas revenues, spurring the creation of an indigenous middle class.
But Bolivians have been losing patience with his now-entrenched Movement Toward Socialism.
The vote also closely followed a revelation that Morales may have been personally involved in influence-peddling.
"Evo's traditional opposition among the affluent and middle class was joined by a wide swath of voters who have long been a part of his political support," said Jim Shultz, executive director of the left-leaning Democracy Center political advocacy group.
"Their turnaround isn't about moving rightward," but rather a rejection of corruption that reflects a belief "that 20 years is too long for one person to be president," he added.
Until Sunday's ballot, Morales had prevailed in nationwide elections, including a 2009 rewrite of the constitution, with an average 61.5 per cent of the vote.
The margin of defeat coincided almost exactly with two unofficial "quick count" samples announced Sunday by polling firms.
The result proved allegations of vote fraud by some members of the opposition to be unfounded, said Jose Luis Exeni, a member of the Supreme Electoral Tribunal.
The vote count had been unusually slow and the vice-president had said earlier Tuesday that the outcome would be a "cliff-hanger."
He claimed a right-wing conspiracy was "trying to make disappear by sleight of hand the rural vote that favours Morales," but provided no evidence to back the claim.
Organization of American States observers reported no evidence of fraud, and the delegation leader, former Dominican Republic President Leonel Fernandez, left Bolivia on Tuesday.
Early in his presidency, Morales crushed the right-wing opposition with an anti-colonialist agenda that championed Bolivia's long-downtrodden native majority. He expelled the DEA and a U.S. ambassador, thriving on anti-Yankee rhetoric.
Morales, who leads a coca-growers union, also upset drug warriors with a less violent coca-eradication program in the world's No. 3 producer of cocaine.
Morales denied influence peddling
But a more formidable opposition eventually emerged from within his own movement and it stung in March 2015 municipal and regional elections, when opposition mayors won in eight of Bolivia's 10 biggest cities.
"The cost of corruption has been high," said political scientist Marcelo Silva of the Universidad Mayor de San Andres. He said infighting in the governing party over a successor could now weaken it even further.
The unprecedented economic boom over which Morales presided, in which gross domestic product per capita rose by nearly one-third, has now waned. Bolivia's revenues from natural gas and minerals, making up three-fourths of its exports, were down 32 per cent last year.
Looking shaken as early results showed the ballot question losing, Morales expressed confidence Monday that he would prevail and blamed "a smear campaign" on his poor showing in cities, where 70 per cent of the electorate now lives. He also suggested social networks bore some responsibility by spreading unreliable information.
The vote's timing could not have been worse for him.
He was stung this month by an influence-peddling scandal involving a former lover that analysts said cost him dearly. The girlfriend, it was revealed, was named sales manager of a Chinese company in 2013 that has obtained nearly $500 million in mostly no-bid state contracts. Photos of her mansion in a wealthy southern La Paz enclave spread online.
Morales denied any impropriety and claimed he last saw the woman in 2007. But a picture of the two together last year emerged, casting doubts.
Most harmful among scandals plaguing the governing party was the skimming of millions from the government-managed Fondo Indigena, which runs agricultural and public works in the countryside.
Judicial corruption has also been endemic and freedom of expression suffered under Morales, with critical media and environmentalists complaining of harassment by the state.