Police in western Indonesia say a would-be suicide bomber failed to detonate explosives in a packed church during Sunday Mass.

National police spokesman Maj. Gen. Boy Rafli Amar says the assailant left a bench and ran toward a priest at the altar but a bomb in his backpack apparently did not detonate and left the attacker injured.

Amar says the man kept running toward the priest with a burning backpack as the congregation chased and captured him.

The motive of the attack is not clear.

Indonesia, the world's most populous Muslim nation, has suffered a spate of deadly attacks by Muslim militants since the 2002 Bali bombings that killed 202 people.