Dramatic video shot from inside a TC Television studio in Ecuador shows the moment that heavily-armed police in Guayaquil stormed the building after it had been taken over by gunmen.

Masked men broke onto the set earlier in the day Tuesday, waving guns and explosives during a live recording at the public television channel, leading to stunning video of screams and the sound of gunshots during a broadcast.

Ecuadorian authorities have not said who was behind the occupation at the television station, but it's the latest in a series of destabilizing attacks that have shaken the country, and happened shortly after a high-profile drug gang leader escaped from prison.

President Daniel Noboa has declared a national state of emergency and designated 20 drug trafficking gangs operating in the country as terrorist groups.

Ecuador's attorney general's office has also announced that the 13 people arrested in the attack on TC Television will be charged with terrorism.