Gunmen stormed a studio at public broadcaster TC on Tuesday afternoon, carrying long-range guns, grenades and dynamite, part of a wave of violence that has prompted President Daniel Noboa to name 22 gangs as terrorist organizations to be targeted by the military.

Images from the channel's live feed, which remained on air for about 20 minutes, shocked the country and made headlines around the world.

Journalist Jose Luis Calderon, 47, was in the studio as his colleagues led a broadcast around 2 p.m. local time, when he heard yelling, shots and people running outside in the hallway.

"Our immediate reaction was to seek refuge in the bathroom," he said. He hid with some colleagues and they called family members and police, but were overheard by the gunmen.

"They forced us, under threats, to come out," Calderon said. "They took us (into the studio) as hostages with other colleagues."

The attackers, some of whom appeared to be teenagers, menaced the staff with guns, Calderon said.

The gunmen said several times they were part of La Firma, a gang associated with larger crime group Los Choneros, one of the gangs named as a terrorist organization by Noboa.

The apparent escape of Los Choneros leader Adolfo Macias from prison over the weekend contributed to Noboa's declaration of a state of emergency on Monday.

Calderon said the balaclava-clad gunmen held a rifle to his head and tucked dynamite into his jacket, demanding he appear on the live feed.

"That's when I said the police shouldn't come in or they would kill us one by one, that was what they obliged me to say," Calderon said, adding he had never experienced anything similar in his 23-year career. "It was surreal."

He felt calm despite the two-hour ordeal, knowing that calls had already been made to the police, Calderon said, but tensions rose when police gunshots were heard outside and some colleagues begged for their lives.

"The individuals shot their guns, I think in reaction to the police and they shot a door and one of the bullets ricocheted and injured the leg of a cameraman," Calderon said.

The channel has said another employee suffered a broken arm.

The gunmen eventually surrendered and 13 people were arrested at the site. On Wednesday the detainees were presented to the media by police.

One video shared on social media shows a gunman laying down a rifle as police stand several meters away, before he kneels and armed officers flood the set.

Another video shows the young men, some with bruised faces, being escorted from the station by heavily armed police - some in street clothes and face coverings - in bullet-proof vests.

(Reporting by Yury Garcia and Herbert Villarraga in Guayaquil; Writing by Julia Symmes Cobb; Editing by Rosalba O'Brien)

By Yury Garcia and Herbert Villarraga