Soldiers and military vehicles rammed the doors to Bolivia's government palace, but withdrew after what the country's president, Luis Arce, describes as an attempted coup.
The general behind the storming has been arrested, but claims he acted on the orders of the president.
Video clips on TV in Bolivia showed the country's president, Luis Arce, confronting the alleged coup leader and military chief, Juan José Zúñiga, inside the government palace in La Paz.
I am your captain and I order you to withdraw your soldiers. I will not allow this disobedience, said Arce.
Zúñiga, who did not explicitly state that he led a coup, stated in a statement that the military is trying to "restore democracy and free our political prisoners".
Arce explained in turn that the government is ready to handle any coup attempts and announced a new military leadership.
The Bolivian people need to organise and mobilise themselves against the coup, said the president from inside the palace.
The soldiers then withdrew, while people with Bolivian flags flooded the square. Only three hours after the dramatic scenes began, the alleged military coup was over.
Thanks to the Bolivian people, said Arce to the gathering outside the palace, praising democracy.
Blames the President
Bolivian authorities later stated that General Juan José Zúñiga had been arrested.
But Zúñiga himself claimed, shortly before he was arrested, that the order to storm the palace came from the president himself, in order to increase his popularity, writes AP.
Bolivia's Justice Minister, Iván Lima, says that Zúñiga is lying in an attempt to justify his own actions, for which he will be brought to justice.
In a post on X, Lima writes that prosecutors will request the maximum sentence of 15 to 20 years' imprisonment for Zúñiga, "for having attacked democracy and the constitution."
Intensifying Protests
The former president, Evo Morales, condemned the military's actions in a post on X, and called it a coup "in the making".
Over the past few months, Bolivia, which has a population of twelve million people, has experienced increasingly intense protests against the country's economic development.
The political struggle within the ruling party has also intensified.
Former president Evo Morales fled the country in 2019 amidst violent protests after his victory in the presidential election was questioned. After returning from exile, Morales announced last year that he intends to run in the 2025 presidential election, thereby challenging his successor and party colleague Arce, which has triggered a power struggle and split within the ruling party MAS.