Police in Ecuador have arrested seven gunmen who stormed a hospital in an attempt to kill a teen being treated there.
Gang members took nurses hostage and exchanged fire with police before they were detained.
All hostages were freed and no one was injured, officials said.
The 17-year-old target of the attack, known as “Dirty Face”, is thought to be a rival gang member who is in intensive care recovering from bullet wounds.
The gunmen held five staff members hostage for more than an hour, one employee told local newspaper El Diario.
Video circulating on social media appears to show balaclava-clad men holding guns and briefly shoving a screaming woman through one of the hospital’s exit doors before dragging her back into the building.
Other hospital employees at the hospital in the town of Chone, in western Ecuador, said they had locked themselves in rooms while the gunmen broke down doors in search for the teenager.
“They didn’t know the hospital layout, it seems, and that’s why these delinquents were roaming through the entire hospital,” Homero Andrade, who represents employees at the hospital, told El Diario.
“Thanks to God and to the police we’re still here to tell the tale,” Mr Andrade said.
Ecuador’s President Guillermo Lasso also thanked the police, saying that their intervention had saved lives.
The president shared footage on Twitter showing armed officers poised to enter the building ahead of the arrests.
Gang violence in Ecuador has grown sharply in recent years, including gruesome tactics such as decapitations, and there has been a series of deadly prison riots.
Analysts think that this spike in violence is partly due to violent Mexican cartels expanding to Ecuador where they recruit local gangs to smuggle cocaine.
President Lasso has declared a state of emergency multiple times since he took office last year, in an attempt to tackle the sharp rise in violence.
In early November, he said attacks by increasingly powerful drug gangs were a declaration of war.