Hundreds of angry protesters went on a rampage through the streets of a town in Central Java on Tuesday, burning down churches and clashing with police in response to a sentence request in a blasphemy trial.

Police fired warning shots and used tear gas to restore calm in the district of Temanggung, 400km east of Jakarta, when violence broke out after prosecutors requested a five-year sentence, the maximum allowed under Indonesian law, for a man accused of distributing materials that insulted Islam.

The violence initially broke out at the Temanggung District Court but quickly spilled onto the streets with the crowd demanding the accused, Antonius Richmond Bawengan, 58, be given the death penalty.

Protesters demanded Bawengan be handed over and chanted "kill, kill" outside the court as he was lead away under heavy security.

The angry mob then trashed the courtroom before targeting Christian sites, burning down a number of churches and schools.