Terrified journalists being forced to kneel in a TV studio by gunmen pointing high-powered weapons at their heads as the cameras rolled, police officers pleading for their lives after being kidnapped on duty.
The scenes which have unfolded in Ecuador show the extent to which this once peaceful haven in Latin America has descended into violence.
Here, we take a closer look at how Ecuador became involved in what its president has declared an "armed internal conflict".
Ecuador's president, Daniel Noboa, has ordered the armed forces to restore order in the country after days of unrest which saw two gang leaders escape from jail, prison guards held hostage, and explosive devices set off in a number of cities across the country.
In the most dramatic attack, a group of armed men forced their into the studios of TC Television in Guayaquil, Ecuador's largest city, and tried to force one of the presenters to read out a message live on air.
Watch: Armed men interrupt live broadcast and threaten presenter (contains distressing scenes)
The gunmen were eventually overpowered by soldiers and have been arrested but the live footage of the stand-off between the hooded men and the armed forces while TC staff cowered on the floor have terrified Ecuadoreans.
The most recent surge in violence kicked off on 7 January when police moved into La Regional, a prison in the port city of Guayaquil, where notorious gang leader Adolfo Macías Villamar, better known as "Fito", was being held.
The plan had been to transfer Fito to La Roca, a smaller prison within the same compound, which is considered safer as it holds fewer inmates.
But when police entered Fito's cell, they found it empty.
A government spokesman said that Fito had been tipped off about his impending transfer as early as Christmas, and had escaped before he could be moved.
It is not clear when exactly he absconded or how, but two prison guards have been charged with helping him escape.
News of his escape triggered riots in at least six jails across the country, with a number of prison guards taken hostage.
Many of the prison wings housing Ecuador's most notorious gang members are controlled not by the state, the guards or the security forces, but by the inmates themselves.
Individual cells can be rented from the inmates running the wing, and food, drink and drugs which are smuggled into the jail can also be bought from those in charge.
A music video recorded by Fito's daughter in September includes footage showing her father in the prison courtyard and gives an idea of why he would not want to leave La Regional.
It shows him petting his fighting cockerel and also relaxing with fellow prisoners. His cell is spacious and decorated with garish murals and boasts its own shower cubicle.
Fito leads Los Choneros, one of Ecuador's most powerful prison gangs. But there are other prison gangs which control other penitentiaries.
In some prisons, individual wings are controlled by rival gangs with the warring sides sometimes only separated by barbed wire.
Any shift in the power balance between the gangs - or even a gang-internal power struggle - can turn deadly in this confined and overcrowded space.
This became clear when the 2020 assassination of the previous leader of Los Choneros, Jorge Luis Zambrano, led to a split in the gang, with its off-shoots soon turning into mortal enemies of their former comrades.
On 21 February 2021, simultaneous fights erupted in four jails between the rival factions - 79 inmates were killed.
While the number of dead was shocking at the time, it was surpassed later that year when 123 prisoners were murdered in a gang fight in Litoral prison, which is part of the same compound in Guayaquil from which Fito escaped.
In an interview Fito gave to Ecuadorean journalists Andersson Boscán and Mónica Velásquez in 2021 for their series Paz o Plomo (Spanish for Peace or Lead), the gang leader warned that any attempts to move him or other gang leaders to La Roca would trigger a "sudden death" scenario in which "there will be riots at all prisons".
Ecuador is sandwiched between Colombia and Peru, the two largest producers of cocaine in the world.
According to the United Nations Global Report on Cocaine 2023, cocaine production recently reached a record high.
The security forces in Colombia, in particular, have spent decades trying to stem the flow of cocaine and its police force has received training and support from the Unites States.
But just as police forces have pooled resources in order to disrupt the flow of cocaine, the gangs doing the trafficking have also become more international.
Mexican drug cartels and criminal groups from the Balkans gained a foothold in South America after the Farc rebel group, which used to control many of the smuggling routes in Colombia, demobilised as part of a peace deal signed in 2016.
These transnational crime groups were keen to explore new ways to transport the cocaine produced in Colombia to buyers in Europe and the United States.
And Ecuador with its large ports on the Pacific coast and limited experiences in dealing with crime gangs soon became an attractive transit country for their drug shipments.
President Daniel Noboa declared a 60-day state of emergency on Monday and a nationwide curfew from 23:00-05:00 every night.
The state of emergency allows the president to send soldiers into prisons to restore order and he can also deploy them across the country to help police with their tasks.
Police can stop people in the streets to search them for weapons and also have the power to carry out searches in people's homes if they suspect arms or explosives are hidden inside.
The state of emergency prompted an immediate backlash from the gangs. One of the police officers kidnapped while on duty was forced to read out a videotaped statement warning the president that "you declared war, you will get war".
"You declared a state of emergency. We declare police, civilians and soldiers to be the spoils of war," the statement continues.
On Tuesday as the storming of the TV studio in Guayaquil unfolded, the president went a step further and declared an "armed internal conflict".
He also ordered the armed forces to "neutralise" the gangs behind the violence. He also published a list of 22 gangs which he said would now be considered "terrorist organisations".
The head of the armed forces also stressed that there would "no negotiations" with the gangs who were causing the violence.
How he will confront the prison violence which has now spilled over into the streets of Ecuador's main cities is a huge test for Mr Noboa, who has only been in office two months.
The 36-year-old was elected in the wake of the assassination of presidential candidate Fernando Villavicencio in August on a promise to combat the gangs which are thought to have been behind Villavicencio's murder.
But five months after that shocking event, many Ecuadoreans are again scared to leave their homes as the violence from its prisons has spilled into the streets of major cities.