Soldiers and police exchanged fire with assailants in front of Tunisia's Interior Ministry on Saturday.
The rioters caused a lot of damage in the capital city of Tunis. The main train station there was burned to the ground and many businesses were looted.
A local official in Tunisia said the prison director let 1,000 inmates escape after protests.
The official estimates that five people were killed when soldiers at the prison opened fire on inmates after they rebelled.
Speaking on condition of anonymity out of security fears, the official said the prison director opened the prison gates to prevent further bloodshed.
The Associated Press contributed to this report.