About 200 inmates broke out of an overcrowded prison in western Indonesia Friday, rushing out of the jail after they were let out of their cells to pray, officials said.
Almost 80 were quickly recaptured after the incident, which occurred when prison guards allowed inmates to take part in Friday prayers in the Muslim-majority nation.
But the inmates instead headed to the main door of the jail in Pekanbaru city, on Sumatra island, and tried to break through it.
When that failed, they fled through a side entrance and broke through a wire fence at the jail, which was guarded by only a handful of officers, Indonesia's director general of prisons, I Wayan Dusak, told AFP.
Amateur footage broadcast on local TV stations showed scores of men, some wearing sarongs, scurrying through the gates of the Sialang Bungkuk prison, with no sign of officials in pursuit.
"About 200 escaped, but at least 77 people have been recaptured," local police spokesman Guntur Aryo Tejo told AFP.
Police have put road blocks in the city and launched a massive hunt for the inmates still on the loose.
Dusak said the trigger was discontent over the head guard, whom prisoners want replaced.
The male-only prison has a capacity of 300 people but was holding 1,870 inmates, with only five guards and a porter on duty at any one time, Dusak said.
More than a thousand inmates who did not escape the prison were refusing to return to their cells unless the head guard was replaced.
An additional 400 police and military personnel have been deployed to guard the prison, Tejo said.
Jailbreaks are common in Indonesia, where inmates are held in often unsanitary conditions at overcrowded prisons.
There was a spate of breakouts in 2013, including one where about 150 prisoners - including terror convicts - escaped from a jail on western Sumatra island.