Bolivian police have arrested the leader of an apparent attempted coup, hours after the presidential palace in La Paz was stormed by soldiers.
Hundreds of troops and armoured vehicles had taken up position on Murillo Square where key government buildings are located. One armoured vehicle smashed down the main gate of the presidential palace, allowing soldiers to enter. They all later withdrew.
The rebel military leader in charge, Gen Juan José Zúñiga, had said he wanted to "restructure democracy" and that while he respected President Luis Arce for now, there would be a change of government.
He was later arrested, seconds after telling reporters the military had intervened at the president's request.
Gen Zúñiga was removed from his role on Tuesday, after he made inflammatory comments about Bolivia's former president, Evo Morales, during an interview the previous day.
President Arce condemned the coup attempt, calling on the public to "organise and mobilise... in favour of democracy".
"We cannot allow once again coup attempts to take Bolivian lives," he said in a televised message to the country from inside the presidential palace.
His words clearly resonated, with pro-democracy demonstrators taking to the streets in support of the government.
In dramatic footage seemingly filmed inside the presidential palace, President Arce could be seen confronting Gen Zúñiga, ordering him to stand down and asking him to vacate the role.
He also announced he was appointing new military commanders, confirming reports that Gen Zúñiga had been dismissed after openly criticising Mr Morales.
Mr Morales, who also condemned the coup attempt, called for criminal charges to be brought against Gen Zúñiga and his "accomplices".
The public prosecutor's office has opened a criminal investigation. The head of the Bolivian Navy, Vice-Adm Juan Arnez Salvador, has also been arrested.
Gen Zúñiga's exact motivations for launching the coup remain unclear.
He was sacked after appearing on television on Monday, saying he would arrest Mr Morales if he ran for office again next year, despite the former president being barred from doing so.
Mr Morales was forced out of office in 2019 by military chiefs who said he was trying to manipulate the result of a presidential election, sending him into exile in Mexico.
Speaking from Murillo Square after it was taken by troops, he accused an "elite" of taking "over the country, vandals who have destroyed the country."
But moments before his arrest, the general told reporters that the president had instructed him to get out the "blindados" (armoured vehicles), in a bid to improve his waning popularity. He was bundled into a waiting police van seconds later.
Andrea Barrientos - a leading opposition senator - echoed his claims, suggesting that an economic and judicial crisis had prompted Mr Arce to launch a "self-coup".
"I will say that the government has a lot of questions to answer to the people of Bolivia, and they need to explain this situation very well," she added. "We will say that we need a deep investigation about this situation."
It is increasingly clear that Wednesday's move this was a short-lived and ill-judged military uprising rather than any wider unravelling of power.
Nevertheless, the coming weeks will be key in establishing whether Gen Zuñiga's military insurrection was just an isolated incident.
Certainly, the government now looks more vulnerable, and others may try to dislodge Mr Arce's administration - albeit through politics rather than via the military.
Mr Morales called on his supporters, particularly in the country's indigenous coca-growers movement, to take to the streets to demand an end to the attempt coup.
That display of popular power may well have helped strengthen the resolve against Gen Zuñiga's plans, which also included freeing "political prisoners" including former leader Jeanine Áñez.
Both Mr Arce and his predecessor belong to the same political party, despite internal political feuds. Their alliance has led some Bolivians, including Gen Zúñiga, to worry that Mr Morales might seek another term in office.
Concerns come after he tried to bypass the constitution and seek a fourth term in 2019. Mr Morales went on to win the vote, but he was forced to resign and flee the country after violent protests.
The centre-right Jeanine Áñez was the country's interim leader between 2019-20, but was sentenced to 10 years in jail over what prosecutors say was a coup to oust her predecessor Mr Morales. The incumbent president, Mr Arce, went on to win a re-run vote in 2020.
Formerly allies, Mr Arce and Mr Morales have not seen eye to eye on much recently, but they were united in their condemnation of the use of troops to force political change in Bolivia.
Before Mr Morales took power in 2005, Bolivia was one of the most politically volatile nations in the Americas. His time in power brought much-needed stability to the Andean nation, at least until its ignominious end.
For his part, Mr Arce - who was elected after a period of instability following the 2019 election - will have been heartened by the speed of the regional response.
Close allies like the left-wing governments in Venezuela and Colombia were quick to condemn what was happening and call for democracy to prevail. Washington also called for calm.
In Paraguay, centre-right President Santiago Peña also condemned the attempted coup.
Even those Bolivians who opposed his socialist rule will not want to see a return to a dark time in South America where militaries with terrible human rights records often pushed out the country's democratically elected leaders at the barrel of a gun.
But Jhanisse Vaca Daza - a human rights activist - said she feared Mr Arce could use the apparent coup as a reason to crack down on his opponents.
"It will legitimise and give (President) Arce's government more power to arrest new members of the opposition who they deem may be a threat to their governance," she said.
"The fear for many people that are currently Legislative Assembly members is that this could also lead to either closing the Legislative Assembly or arresting members that may be suspected to have collaborated with the military."