(CNN) -- Indonesian police are searching for potentially hundreds of escaped inmates following a deadly prison riot in Medan, the capital of the province of North Sumatra. At least five people died, including two guards and three prisoners.
More than 200 inmates, some of whom were jailed on terrorism charges, broke free from the maximum-security facility Thursday when the "water supply was cut off because of a power outage," said Ronny Sompie, the National Police Spokesman Brigadier General.
Angry prisoners, unable to bathe or use the bathroom, burned the door to the prison offices, stole guns and took guards hostage.
"The situation is under control and the fire at the prison has been extinguished," said Sompie.
At least 55 prisoners have been recaptured. Some 800 police and military officials are now searching the surrounding area for escapees.
"It's unclear how many more escaped prisoners are out there. We're still waiting for the data from prison officials," Sompie said.
The prison, Tanjung Gusta Correctional Institute, houses 2,600 inmates, according to a press statement from the Ministry of Law and Human Rights. The facility's maximum capacity is 1,054. Overcrowded prisons are typical in the country.
Indonesia has made major progress in fighting once-rampant terrorism in the country.
Since the first Bali bombings in 2002, authorities have arrested, convicted and jailed hundreds of terrorists. One of the terror networks behind past major attacks in Indonesia, Jemaah Islamiyah, has largely been weakened because of the arrests or deaths of its leaders.
More recently, Indonesian police killed one of the country's most-wanted terrorists, Dulmatin, in March 2010. The suspected mastermind behind the 2002 Bali bombings, in which 202 people died, had a $10 million bounty on his head, according to the U.S. State Department.
In April 2011, authorities in the capital of Jakarta foiled an Easter bomb plot targeting a Catholic church. Police found seven bombs made from about 150 kilograms (330 pounds) of explosives. Indonesia is the world's most populous Muslim-majority nation.
In October 2012, police arrested 11 people plotting a series of attacks that included the U.S. consulate in East Java as a target.
Last month, Indonesian police foiled a plot to bomb the Myanmar Embassy in Jakarta, according to local media reports. The planned attack was reportedly in retribution for violence against Muslim Rohingya by majority Buddhists in Myanmar.
Kathy Quiano contributed from Jakarta. Ramy Inocencio wrote this article in Hong Kong.