Around 200 prisoners escaped from an Indonesian jail Thursday after violent riots erupted, with inmates setting fire to the prison and hurling bottles at guards.

A source at the jail said that 13 terror convicts were among the inmates who broke out of the prison in Medan city on the island of Sumatra.

Hundreds of soldiers and police were deployed late Thursday to regain control of the jail, as security forces launched a desperate search to track down the escapees.

"The prisoners were annoyed by a blackout and problems getting water, which they said happens often at the prison," Heru Prakoso, North Sumatra province police spokesman, told AFP.

"Prison officials told us that the inmates then set fire to the facility and 200 managed to escape."

An AFP reporter at the scene said the building was still ablaze at 10:00 pm (1500 GMT), hours after the fire started early in the afternoon and that the riots were continuing, with prisoners hurling bottles and setting new fires.

As well as some 700 police and soldiers deployed to regain control, search teams were hunting through Medan by night to find the fugitives. Firefighters were also battling to put out the blazes at the prison.

Prakoso said there were usually 2,600 prisoners held in the jail, and that the police and prison authorities have since beefed up security at the site to ensure more detainees did not escape.