Ecuador's president Daniel Noboa has pledged to hit back at rising crime after a live broadcast was interrupted on Tuesday by balaclava-clad gunmen.
The incident at television station TC was the most dramatic recent example of a renewed explosion of violence in the previously tranquil South American country.
Noboa faces an uphill battle amid gang control of prisons, kidnappings of police and bombings.
Here's what you need to know.
Why has Ecuador's security deteriorated?
Security in Ecuador has been worsening since the coronavirus pandemic, which also brutally battered the economy.
Violent deaths nationally rose to 8,008 in 2023, the government has said, nearly double the 2022 figure of over 4,500. Ecuador's presidential contest last year was marred by the assassination of an anti-corruption candidate.
The government blames the situation on the growing reach of cocaine-trafficking gangs, who have destabilized regions across the continent.
Inside Ecuador's prisons, the gangs have taken advantage of the state's so-called weak control to expand their power.
Prison violence has become increasingly common, resulting in hundreds of deaths in incidents authorities have blamed on gang battles to control the jails.
Guayaquil, a coastal city that is Ecuador's largest, is considered the country's most dangerous with its ports a hub for drug smuggling.
Noboa took office in November touting his "Phoenix Plan" for security, including a new intelligence unit, tactical weapons for security forces, new high-security prisons and reinforced security at ports and airports.
It will cost some $800 million, he said, though $200 million in new weapons for the army will be provided by the United States.
What caused the flare-up of violence in Ecuador?
Police said on Sunday that Adolfo Macias, leader of the Los Choneros criminal gang, had disappeared from the prison where he was serving a 34-year sentence. Authorities are trying to track him down.
Meanwhile, there were incidents of violence in at least six prisons beginning on Monday, with 150 or more guards and other staff taken hostage by prisoners. A prison in Riobamba saw 39 inmates escape, though some have been recaptured.
By Tuesday violence had spread to the streets, with seven police officers kidnapped in incidents around the country and five explosions confirmed in several cities, though there were no injuries.
Noboa, who has said he will not negotiate with "terrorists," has said the violence is a reaction to his government's plans to build a new high-security prison for jailed gang leaders.
What is Ecuador's government doing to mitigate violence?
Noboa declared a 60-day state of emergency - a tool used by his predecessor Guillermo Lasso to little perceived success - on Monday, enabling military patrols, including in prisons, and setting a national nighttime curfew.
In an updated decree published on Tuesday afternoon, Noboa said he recognised an "internal armed conflict" in Ecuador and identified several criminal gangs as terrorist groups, including Los Choneros.
The decree ordered the armed forces to neutralise the groups.
Noboa's coalition has a majority in the national assembly, something Lasso lacked, but some Ecuadorans are questioning why the president is not taking harsher measures against gangs.
Noboa plans to hold a security-focused plebiscite later this year, which would include asking the public if the government should undo a ban on the extradition of Ecuadorans wanted abroad and if asset seizures from suspected criminals should be allowed.