QUITO: Ecuador's police and military on Sunday were aiming to restore order inside the country's dangerous prisons where dozens of staff were held hostage by inmates amid an uptick in violence in the Andean nation.

Images on social media shared by Ecuadorean armed forces showed shirtless prisoners on their knees with hands on their heads as armed soldiers entered the seven jails that were the scenes of a hostage crisis that ended Saturday evening.

Security forces were conducting searches and regaining control of the prisons, the military said.

"The national police are respecting the human rights of these people. We are doing so in a very calm manner," Norman Cano, police chief at the Esmeraldas prison, said on social media.

The hostages, which the SNAI prison agency previously said were 158 guards and 20 administrative staffers, were held since last Monday in at least seven prisons before they were freed.

Armed groups appear to be reacting to President Daniel Noboa's plans to tackle the dire security situation, according to the government.