A police and military operation to enter a jail in the southern Ecuadorean city of Guayaquil amid disturbances mobilized more than a thousand personnel, officials said on Saturday.
The Regional Guayas jail is located next to the Penitenciaria del Litoral prison, where 118 inmates were killed in the country's worst-ever prison violence earlier this week.
Ecuador is suffering a wave of violence at its prisons, which house some 39,000 people, with officials blaming battles for control between criminal groups.
Prison violence also killed 79 people in February and 22 in July.
"As a result of these actions firearms, munitions and prohibited items were seized," Ecuador's SNAI prison authority said of the operation involving the military on Twitter.
When they entered the jail, police and military personnel found four inmates who were injured during confrontations between prisoners, police commander Tannya Varela said.
"When we entered the maximum (security) wings we were received with bullets," Varela told journalists. "We entered and removed the four injured. They were evacuated by the armed forces and taken to be attended to."
Police also arrested seven alleged members of a crime gang planning to bring weapons and uniforms similar to those worn by guards into the jail, she said.
Those arrested were captured during a meeting in Guayaquil to discuss the plans and other crimes, she said, and they may have been planning to attack guards or inmates.