The former Bolivian president Evo Morales has been granted asylum by Mexico, the country’s top diplomat has said, following the veteran socialist’s announcement on Sunday that he would resign.

Mexico’s foreign minister, Marcelo Ebrard, told reporters: “We will immediately proceed to inform Bolivia’s foreign ministry that under international law, it should offer safe conduct [to Morales].”

Mexico had “decided to grant political asylum to Evo Morales in virtue of the urgent situation which he faces in Bolivia where his life and safety are at risk”, Ebrard added. The minister confirmed that Morales had accepted the asylum offer.

The president’s exit has created chaos and uncertainty in Bolivia as well as stoking fears about a power vacuum. Looting, vandalism and arson carried out by both his supporters and opponents have been already been reported.

Morales’ decision to step down followed several quick-fire developments on Sunday, beginning with the release of a report by the Organization of American States (OAS) that said it had found “clear manipulations” of the voting system in last month’s presidential election and could not verify the first-round victory for Morales. The president responded by saying he would call fresh elections but stepped down after the head of the army publicly called for him to leave his post.

On Monday, Morales used social media to accuse the opposition leaders Carlos Mesa and Luis Fernando Camacho of instigating a coup against him. “[They] lie and try to blame us for the chaos and violence that they provoked,” he said.

The news brought mixed reactions around the world. Donald Trump welcomed it as “a significant moment for democracy in the Western Hemisphere”.

The US president said in a written statement: “After nearly 14 years and his recent attempt to override the Bolivian constitution and the will of the people, Morales’s departure preserves democracy and paves the way for the Bolivian people to have their voices heard.

“The United States applauds the Bolivian people for demanding freedom and the Bolivian military for abiding by its oath to protect not just a single person, but Bolivia’s constitution.”

Morales supporters being arrested in La Paz on Monday. Photograph: Ronaldo Schemidt/AFP via Getty Images

Morales, Bolivia’s first indigenous leader, is an iconic figure for the international left and was the last survivor of Latin America’s “pink tide” of two decades ago. But the country has been roiled by mass protests since last month’s disputed election result.

In Mexico Ebrard issued a statement on Monday defining what had happened as a “military coup”, and calling for an urgent meeting of the OAS.

“What happened yesterday [in Bolivia] is a step backwards for the whole continent,” he said. “Military coups never bring anything positive and that is why we are worried.”

Mesa, Morales’ closest rival in October’s disputed election, said the president was brought down by a popular uprising, not the military. He said the military had made a decision not to deploy in the streets because “they didn’t want to take lives”.

In Bolivia the immediate concern was the void left as resignations by Morales and his vice-president, Álvaro García Linares, were followed by the next in line, the senate president, Adriana Salvatierra. Her deputy, Jeanine Añez, is expected to assume the interim presidency.

Jeanine Añez in La Paz on Monday. Photograph: Natacha Pisarenko/AP

In a wave of resignations, parliamentarians, local politicians and top brass in the army and police also stepped down.

“We are living in chaos with no one assuming the reins of power, said Carlos Cordero, a political scientist at La Paz’s San Andrés university. He said no clear timeline had emerged for scheduling a fresh vote.

A senior US state department official said a copy of Morales’s resignation letter was circulating: “We’re trying to determine if that is a valid document or something else that somebody fabricated, but we have seen a draft that has been signed.”

Giving Washington’s view, a senior US official said: “Our understanding is that what happens in fact is that people serving in public security forces and the police declined to repress the protests and later that members of the armed forces declined to repress these protests.

“And at that point Evo Morales resigned when leaders of the security forces pointed out the obvious: he had lost the faith of the public, and that the security situation had become especially grave.”

Commenting on the wave of resignations, the official said. “There is still a constitutional structure and therefore a clear line in the constitution for creating a legitimate succession of authority … if there is a vacuum of power, there are people who clearly have it within their reach to help reestablish a legitimate structure of governance.”

Another senior US official said he expected the legislative assembly to meet later on Monday or on Tuesday, and that talks were ongoing to ensure enough politicians are present to form a quorum.

“We certainly hope that all members of the assembly participate fully,” the official said. “And I think it’s important to say that they have the absolute right to participate fully in the political debates that their country is facing without hindrance, without threats, without violence and that they deserve protection.”

On the question of who should be able to stand in new elections, the same US official said: “Our position is that people who are directly implicated in trying to distort the outcome of the elections should not participate in the follow-on election … That’s not a statement about any political party.”

The US state department issued a statement calling for the OAS to send a mission to Bolivia to oversee the electoral process. “The Bolivian people deserve free and fair elections,” it said.

Social media fuelled competing claims of arson attacks or death threats against both sides after Morales’ resignation. Armed intruders broke into Morales’ home in Cochabamba and he accused “coup plotters’ of an arson attack on his sister’s home and of making death threats against his ministers and their children.

Spain’s foreign ministry criticised the role of Bolivia’s police and army in the resignation and urged “all actors to avoid resorting to violence” and “guarantee the safety of all Bolivians … including former president Morales himself, his relatives and members of his administration”.

Amid claims of a witch-hunt, the head of Bolivia’s supreme electoral tribunal, María Eugenia Choque, stepped down after the release of the OAS report. The attorney general’s office said it would investigate the tribunal’s judges for possible fraud, and police later said Choque had been detained along with 37 other officials on suspicion of electoral crimes.

Local media later quoted her as saying: “I have been the prisoner of imposed decisions.”

On Monday a tense calm returned to La Paz after weeks of street protests. Gone were the crowds chanting: “This is not Cuba, nor Venezuela. This is Bolivia, and Bolivia is respected.”

One resident, Carlos Jiménez, 50, said: “There’s a lot of uncertainty … The people are divided but most of us think the president abused his power. [He] has to accept the people don’t want him any more.”

Bolivia’s state news agency, ABI, said Morales announced his resignation from Chapare province, where he began his political career as a union leader. He said he was returning there.

“I return to my people who never left me. The fight goes on,” he said.

However, the Democratic congresswoman, Alexandria Ocasio-Cortez, alleged that the events in Bolivia amounted to a coup. “The people of Bolivia deserve free, fair, and peaceful elections – not violent seizures of power,” she tweeted.

Additional reporting by Jo Tuckman in Mexico City