More than 50 prison guards and seven police officers have been taken hostage in several jails in Ecuador, according to officials.
Two car bombs also went off in the capital, Quito, both targeting the country's prisons authority (SNAI).
Nobody was hurt in the bombings and at least six people have been arrested.
The authorities believe at least one of the incidents could be retaliation for a police search for weapons at one of the country's biggest jails.
Ecuador's Interior Minister, Juan Zapata, said the authorities were taking action, but did not give further details.
"We are concerned about the safety of our officials," said Mr Zapata.
Hours earlier, a bomb targeted a building that had formerly been used by the SNAI in Quito. The second explosion targeted the agency's headquarters.
Police said the later attack was carried out using a vehicle that had been rigged with explosives.
Quito Mayor Pabel Munoz said there were also grenade explosions in the city during the night.
Ecuador is facing growing violence linked to drug-trafficking gangs, which has put a huge strain on the under-resourced and overcrowded prison system.
Hundreds of inmates have been killed in deadly fights in Ecuador's overcrowded jails in recent years.
Such is the influence of narco-politics in Ecuador, its prisons are places of power - it's where those involved in drugs offences get locked away.
But they're also the control centres of many of the cartels and gangs now - so when inmates don't like what the authorities are doing, they make that known through violence and riots.
The country is less than two months away from the run-off round of presidential elections - a campaign that has been, until now, marred by violence and the assassination of a candidate.
Ecuador's largest city, Guayaquil - home to the country's biggest port and prison complex - has traditionally been the epicentre of violence in the country but the capital, Quito, has been hit by a rising murder rate too.
Nowhere is untouched as the violence soars and fears increase around the upcoming presidential vote.
On Wednesday, hundreds of police officers and soldiers carried out a search for weapons and explosives in Cotopaxi jail in Latacunga, about 55 miles south of Quito, as part of efforts to prevent further violence.
"The measures we have taken, especially in the prison system, have generated violent reactions from criminal organisations that seek to intimidate the state," said Ecuador's President, Guillermo Lasso.
"But we are firm and we are not going to go back on the objective of capturing dangerous criminals, dismantling criminal gangs and pacifying the country's prisons."