Bolivia’s embattled president abruptly quit Sunday under pressure from his country’s top general — leading to the arrests of dozens of officials suspected of rigging his re-election last month.

In a televised address, Evo Morales — who had offered earlier in the day to hold a new vote — portrayed his resignation as the result of a “civic coup” against his socialist government.

Morales, 60, said it was his “obligation as indigenous president and president of all Bolivians to seek peace” after weeks of deadly protests over the Oct. 20 election, in which he claimed to have won a fourth term.

“I ask you to stop attacking the brothers and sisters, stop burning and attacking,” he said.

Morales hadn’t even finished his remarks before people began honking car horns, setting off fireworks and waving flags in the capital La Paz, where protesters laid down in front of the presidential palace and set a coffin on fire.

It was unclear who would succeed Morales — who served nearly 14 years in office — as both his vice president and the senate president, who was next in line, also resigned.

The political crisis unfolded amid a day of fast-moving developments that included the release of a preliminary report by the Organization of American States that alleged a “heap of observed irregularities” during last month’s presidential contest, which sparked unrest that left three people dead and more than 100 injured.

In response to the OAS findings, Morales agreed to another election, but the country’s military chief, Gen. Williams Kaliman, went on TV to demand that the president step down “for the good of our Bolivia.”

The OAS report also prompted the resignation of the president of Bolivia’s Supreme Electoral Tribunal, Maria Eugenia Choque, and an announcement by the attorney general’s office that it would investigate the tribunal’s judges on suspicion of election fraud.

Choque was apprehended while trying to disguise herself as a man, according to Police Commander Yuri Calderon.

The tribunal’s vice president and 36 other officials were also detained, he said.

With wires