Four days after the first round of voting in Ecuador’s presidential election, a turnround in the race for a spot in an upcoming run-off has prompted indigenous candidate Yaku Pérez to cry fraud and raise the prospect of his supporters taking to the streets in protest.

Pérez is locked in a knife-edge battle with rightwing businessman Guillermo Lasso to make the decisive run-off in April against leftist economist Andrés Arauz, who won the first round comfortably. Pérez pulled ahead on Tuesday, opening up a lead of 50,000 votes — but by Wednesday, that had evaporated.

After edging ahead by 5,000 votes, Lasso claimed victory, even though he acknowledged 350,000 ballots still had to be counted.

“This afternoon it has become clear that we are in the second round,” the millionaire former banker and ex-Coca-Cola executive said in a video posted on Wednesday, adding that he accepted the challenge “with profound humility and a great sense of responsibility”. By Thursday, his lead had increased to 18,000 votes.

Pérez and his supporters were livid. Hundreds gathered outside the regional headquarters of the National Electoral Council (CNE) in the city of Guayaquil, where votes were still being counted. Many had come from the country’s indigenous heartland in the Andes mountains and wore traditional dress. They waved the rainbow flags of the Ecuadorean indigenous movement.

“My comrades have been calling me from all over the country, asking me ‘what should we do, should we go out on the streets, should we block roads?’” Pérez told the Financial Times as he marched towards the CNE building and demanded entry. “I’ve said ‘no, please, peaceful resistance, let’s be vigilant’. But I’m worried.”

Ecuador’s indigenous movement is relatively small: one study in 2018 found that 7 per cent of the country’s 17.4m people identify as indigenous compared to 24 per cent in Peru and 62 per cent in Bolivia.

But it is vocal and well-organised. In 2019, thousands of indigenous activists descended on the capital Quito to protest against fuel price rises, joined by radical urban leftists. The city was convulsed by 10 days of fierce clashes with the police in which at least eight people died. The government was forced to back down and scrap the price rises. Indigenous communities have also waged successful campaigns against oil extraction in the Amazon basin.

After launching his bid for the presidency last year, Pérez has become the face of the movement, although polls suggested he had little chance of winning.

Born in a rural parish in the mountains of southern Ecuador, Pérez was known for most of his life as Carlos Ranulfo Pérez, but changed his first names four years ago to Yaku Sacha. Yaku means water in the Quichua language while Sacha means forest. He is campaigning to become the first indigenous leader in Ecuador’s history.

Aged 51, he has been an environmental activist for two decades. He has long opposed mining projects in the Andes and fought to protect the water rights of indigenous farmers.

“The central theme of his fight is against mining and in defence of water,” said Alberto Acosta, editor of Weekly Analysis, a local economic report. “If he gets in to the presidential palace he says he wants a referendum to ban all new mining projects, although during the campaign he clarified he wouldn’t shut down existing projects.”

Arauz, who claimed nearly a third of the first-round vote, has the backing of the country’s former president Rafael Correa and advocates interventionist leftwing policies. He has pledged higher taxes for the rich and an increase in public spending to reboot an economy that shrank by about 7 per cent last year because of coronavirus. Aged 36, he is bidding to become the country’s youngest president.

While both men regard themselves as progressives, little love is lost between their camps. Pérez’s party, Pachakutik, was fiercely critical of Correa during his time as president, accusing him of betraying the indigenous cause by opening up the Amazon to oil companies.

At stake is Ecuador’s economic future. Last year, the country — one of the poorest in South America — took steps towards putting its indebted and dollarised economy back on track, agreeing a $6.5bn lending agreement with the IMF and renegotiating the terms of its $17.4bn of sovereign debt with bondholders.

Arauz says the IMF’s conditions are too onerous and he would renegotiate the agreement, which calls for a hefty fiscal adjustment of 5.5 percentage points by 2025 through a combination of tax reform and spending cuts.

Pérez has likewise criticised the IMF deal and refused to meet the Fund’s representatives when they came to Quito last year. Even Lasso, the most economically orthodox of the three, says he cannot endorse the tax rises the Fund advocates.