It wasn't a coup attempt.
But when soldiers briefly occupied El Salvador's congress this month to intimidate lawmakers into passing an anti-crime bill, the scene recalled one of Latin America's darkest eras: In the 1970s and 1980s, much of the region was ruled by abusive military dictators.
And it's not just El Salvador. With unpopular presidents facing street protests and demands that they crack down on rising crime and corruption and revive stagnant economies, Latin America's armed forces are once again throwing their weight around.
Perhaps the most dramatic case is Bolivia. In an election last October that was marred by fraud, Evo Morales claimed to have won a fourth term as Bolivia's president. Amid protests and demands that he step down, Morales clung to power. But then, the country's armed forces commander weighed in.
In a TV address, Gen. Williams Kaliman said: "We suggest that the president resign for the good of Bolivia."
A few hours later, Morales did just that — then fled to Mexico and later Argentina.
"It wasn't a coup in the traditional sense, but it was the military putting its thumb on the scales," says Adam Isacson, a military analyst at the Washington Office on Latin America.
Elsewhere, military officers have helped prop up floundering leaders. For example, when going on TV to announce gas price hikes and other controversial measures, the presidents of Peru, Ecuador, Guatemala and Honduras have surrounded themselves with stern-looking generals. Such choreographed appearances serve as stark warnings to would-be protesters that the armed forces stand firmly in the president's corner.
"The high command is certainly lending itself to political messaging at key moments," Isacson says. "That is a political role that is pretty crucial."
In Mexico, Central America and Chile, troops have been sent into the streets to hunt down criminals, disperse protesters or block migrants. Generals and colonels, in turn, are being brought into the inner circles of civilian governments.
In Venezuela, authoritarian President Nicolás Maduro is deeply unpopular but has retained the support of the armed forces by placing officers in charge of an array of functions, from state food distribution to oil production.
In Brazil, nine of the 22 ministers in President Jair Bolsonaro's government come from the armed forces. They include the vice president as well as Gen. Walter Braga Netto, the army's second highest-ranking officer, who took over last week as Bolsonaro's chief of staff. The far-right Bolsonaro, himself a former army captain, even held a military parade last year to commemorate the 1964 coup that ushered in Brazil's 21-year dictatorship.
"The president does not consider March 31, 1964 a military coup," presidential spokesman Gen. Otávio Rêgo Barros said in response to widespread outrage over the parade. "He believes that — considering the danger Brazil was in — society brought together civilians and the military to put the country back on track."
However, it turned out to be a tragic period as military strongmen came to dominate South American countries and much of Central America — largely with U.S. government backing. Amid crackdowns on regime opponents, thousands of people were tortured and killed. When these dictatorships finally collapsed, a new generation of civilian presidents worked hard to rid their governments of military influence.
"Everything from getting the military out of policing, getting the military out of nondefense cabinet posts, getting civilians in charge of defense ministries, getting human rights trials for past abuses," Isacson says. He describes this process as a "brick-by-brick building of this new edifice of civilian control of the military."
So, why is this edifice now revealing so many cracks?
For starters, polls show growing frustration with Latin America's governments. Mass protests erupted late last year in Bolivia, Chile and Colombia, with a variety of demands ranging from new jobs programs, to crackdowns on corruption, to constitutional reforms. Presidents have reacted by shoring up their inner circles with respected military officers and by deploying troops for handle things like crowd control or even garbage collection during sanitation workers' strikes.
"The military becomes sort of the go-to institution at a time when there is a demand from the public to do something," says Frank Mora, a former U.S. Defense Department official who now heads the Kimberly Green Latin American and Caribbean Center at Florida International University.
He says that for younger Latin Americans, who never lived under martial law, the armed forces can seem like a benevolent institution that follows orders and gets things done.
True, militaries have helped consolidate authoritarian regimes in Venezuela and Nicaragua. However, Mora and other experts say it's unlikely that the region will return to full-fledged military rule.
For one thing, officers are actually quite wary about taking on some of their new duties, especially policing. It can tarnish their reputations, as was the case in Bolivia, where the caretaker president, Jeanine Áñez, ordered the army to break up anti-government protests in November. The result was violent clashes in which at least 36 people were killed.
"They do it reluctantly, and in some cases they get out as quickly as possible," Mora says. "The military is not trained to do this and they know that. And that could lead to not just human rights violations, which many militaries that I have interviewed are very concerned about, but it can expose them to corruption."
Another constraint is money. Even as soldiers take on new tasks, Mora says that overall defense spending in Latin America averages about 1.5% of the region's gross domestic product — among the lowest of any region in the world, he says.
María Victoria Llorente, director of the Colombian think tank Ideas for Peace Foundation, says militaries did a terrible job of governing back in the 1970s and '80s and that they have spent the past three decades trying to repair their prestige. Not even in Venezuela, where the military is widely seen as propping up President Maduro, have the generals tried to assume full control of the government.
Latin American armies "already learned their lesson, and it was a very hard lesson," Llorente says.
What's more, she and other analysts say that the way things stand now, Latin American militaries have the best of both worlds. They enjoy growing clout in government — yet civilian presidents take the rap when things go wrong.