A terrorist attack at a crowded Catholic church in Indonesia on Sunday was narrowly averted, when a would-be Islamist suicide bomber failed to detonate his vest.
The 17-year-old suspect entered a church in the Sumatran city of Medan during the Sunday service, according to the Jakarta Globe. He rushed toward the priest who was leading the service and tried to stab him before setting off the vest, an action that only produced sparks. The priest, meanwhile, escaped unhurt except for a few scratches on his arm.
Read next: Indonesia’s Overcrowded Prisons Are a Breeding Ground for Islamic Extremism
The assailant, who was carrying an ax and a pipe bomb in his backpack along with the knife and vest, was immediately captured by church attendees and subsequently turned over to authorities. A police official told the Globe that a drawing resembling the ISIS flag was recovered at the scene.
According to local publication Tempo, the Southeast Asian nation’s top security minister, Wiranto, said the attacker was a “lone wolf” and not affiliated with any particular group.
However, Wiranto added that the teenager was “obsessed” with ISIS leader Abu Bakr al-Baghdadi, based on videos recovered from his cellphone and a note on his backpack that read “I Love al-Baghdadi.”
Read next: ISIS Has Launched a Newspaper to Recruit Southeast Asian Fighters
Muslim-majority Indonesia has seen an uptick in Islamic extremism this year, with fatal bombings in Jakarta in January followed by multiple attempted attacks — the last of which took place in early July.
More Must-Reads from TIME
- How Donald Trump Won
- The Best Inventions of 2024
- Why Sleep Is the Key to Living Longer
- Robert Zemeckis Just Wants to Move You
- How to Break 8 Toxic Communication Habits
- Nicola Coughlan Bet on Herself—And Won
- Why Vinegar Is So Good for You
- Meet TIME's Newest Class of Next Generation Leaders
Write to Rishi Iyengar at rishi.iyengar@timeasia.com