An Islamic-State-inspired suicide bomber attacked a Catholic priest celebrating Mass in Indonesia on Sunday.

The 18-year-old man rushed the altar and attempted to detonate a backpack bomb, according to reports. The bomb reportedly failed to detonate, so the terrorist pulled an axe out of the backpack and gashed the priest's arm.

The congregation then intervened and managed to wrestle the axe away and detain the man while waiting for police. Law enforcement officials reportedly found a hand-drawn image of the Islamic State flag on the attacker when they detained him, and the terrorist told police he was not working alone.