Bolivian President Evo Morales has resigned after the unrest that followed his controversial reelection last month.
On Sunday, international observers called for the cancellation of the election results, saying they had found "clear manipulations" of the October 20 poll.
Morales approved the conclusions and announced his intention to convene new elections – after the recast of the country's electoral body.
But politicians – the army and police chiefs – had urged him to resign.
In a televised speech, Mr. Morales said: "I am resigning from my position as president."
- The turbulent race of Evo Morales
- Country Profile
His vice president, Alvaro Garcia Linera, also resigned.
Protesters took to the streets to celebrate, chanting "Yes, we could" and setting off firecrackers.
How did we come here?
Bolivia has been shaken by weeks of anti-government protests, following reports of fraud in the presidential election.
At least three people died in clashes. Uniformed police officers also joined the protesters.
On Sunday, the Organization of American States (OAS), which monitored the elections, said it found evidence of large-scale data manipulation and could not certify the outcome of previous polls.
Pressure continued to grow on Morales during the day, as several of his political allies resigned, some citing fears for the safety of their families.
The army chief, General Williams Kaliman, also urged Morales to resign "to allow the pacification and maintenance of stability".
The army also announced that it would conduct operations to "neutralize" all armed groups that attacked the protesters.
Mr. Morales announced his resignation shortly thereafter: "I ask you to stop attacking the siblings, stop burning and attacking."