Bolivian President Evo Morales said on Sunday he would resign after the military called on him to step down and allies tumbled away amid a fierce backlash over a disputed election that has roiled the South American nation.

Morales, in power for nearly 14 years, said in televised comments that he would submit his resignation letter to help restore stability, though he aimed barbs at what he called a "civic coup."

"I am resigning, sending my letter of resignation to the Legislative Assembly," Morales said, adding that it was his "obligation as indigenous president and president of all Bolivians to seek peace."

Vice-President Alvaro Garcia Linera also resigned.

The resignation of Morales, a leftist icon and the last survivor of Latin America's leftist "pink tide" of two decades ago, is likely to send shockwaves across the region at a time when left-leaning leaders have returned to power in Mexico and Argentina.

Pressure had been ramping up on Morales since he was declared the winner of an Oct. 20 vote. The head of Bolivia's armed forces earlier on Sunday said the military had asked him to step down to help restore

People react in La Paz on Sunday after Morales announced that he would resign. (Juan Karita/Associated Press)

"We suggest the President of the State renounce his presidential mandate, allowing peace to be restored and the stability maintained for the good of our Bolivia," said General Williams Kaliman, the commander of Bolivia's armed forces.

"Likewise, we ask the Bolivian people and mobilized sectors to shed attitudes of violence and disorder among brothers so as not to stain our families with blood, pain and mourning."

Earlier on Sunday, Morales had agreed to hold new elections after a report from the Organization of American States (OAS), which conducted an audit of the Oct. 20 vote, revealed serious irregularities in the election.

The OAS report said the October vote should be annulled after it had found "clear manipulations" of the voting system that called into question Morales' win, with a lead of just over 10 points over main rival Carlos Mesa.

'Today we won a battle'

The resignations of both Morales and his vice-president meant it was not initially clear who would take the helm of the country pending the results of new elections.

According to Bolivian law, in the absence of the president and vice-president, the head of the Senate would take over provisionally.

Morales, speaking at an earlier news conference, tried to placate critics by saying he would replace the country's electoral body for the new vote, though his opponents — already angry that he ran in defiance of term limits — were not assuaged.

Anti-government protesters are seen in La Paz after hearing news about Morales resigning. (Juan Karita/Associated Press)

The election standoff has dented the image of Morales — who guided Bolivia through a period of relative stability and economic growth — and hit the landlocked nation's economy.

His "legacy will be compromised and the region will suffer another impact with consequences well beyond Bolivia," said Juan Cruz Diaz, managing director of risk advisory Cefeidas Group, referring to Argentina, Chile, Peru, Paraguay and Brazil.

Luis Fernando Camacho, a civic leader from the eastern city of Santa Cruz who has become a symbol of the opposition, said the OAS report clearly demonstrated election fraud. He reiterated his call for Morales to resign.

"Today we won a battle," Camacho told a crowd of cheering supporters in the capital, though he added more time was needed to repair the constitutional order and democracy. "Only when we can be sure that democracy is solid, then will we go back home."

U.S. Secretary of State Mike Pompeo had welcomed the call for a new vote to "ensure free and fair elections."

Morales loses allies

As the fall-out from the audit report swept across Bolivia, there were signs that Morales' support was waning fast.

Several of his allies resigned, including Mining Minister Cesar Navarro and Chamber of Deputies President Victor Borda, who belongs to Morales' party. They both cited fear for the safety of their families as the reason for stepping down.

Juan Carlos Huarachi, leader of the Bolivian Workers' Centre, a powerful pro-government union, said Morales should stand down if that would help end recent violence.

In recent days police forces were also seen joining anti-government protests, while the military said it would not "confront the people" over the issue after a weeks-long standoff.

People are seen celebrating on the streets of La Paz. (Luisa Gonzalez/Reuters)

The attorney general's office also announced it had ordered an investigation with the aim of prosecuting the members of the electoral body and others responsible for the irregularities.

Mesa said Morales and Linera should not preside over the electoral process or be candidates.

Morales, who came to power in 2006 as Bolivia's first Indigenous leader, had defended his election win but said he would adhere to the findings of the OAS audit.

Canada welcomes results of <a href="https://twitter.com/OAS_official?ref_src=twsrc%5Etfw">@OAS_official</a> electoral audit mission to <a href="https://twitter.com/hashtag/Bolivia?src=hash&ref_src=twsrc%5Etfw">#Bolivia</a>. <a href="https://t.co/RoZdfljBmM">https://t.co/RoZdfljBmM</a> —@CanadaFP

"The manipulations to the computer systems are of such magnitude that they must be deeply investigated by the Bolivian State to get to the bottom of and assign responsibility in this serious case," the preliminary OAS report said.

"The first round of the elections held on Oct. 20 must be annulled and the electoral process must begin again," the OAS added in a separate statement.

Voting should take place as soon as conditions are in place to guarantee it being able to go ahead, including a newly composed electoral body, the OAS said.

The OAS added that it was statistically unlikely that Morales had secured the 10-percentage-point margin of victory needed to win outright.