A man with a backpack bomb tried to blow up a Catholic church during mass in Indonesia on Sunday, but the device failed.
The man then attempted to attack the priest with an axe before members of the congregation grabbed him.
Police found an ISIS picture in the man's possession.
The priest was only slightly injured.
"A terrorism act was carried out on Sunday morning at the Saint Joseph catholic church," said Rina Sari Ginting, spokeswoman for Medan police in a statement. "Police are interrogating the perpetrator ... and will search his house for any bomb-making materials."
A witness present in the church told Reuters the attacker had sat with other worshippers before running toward the priest.
"There was a small explosion like fireworks and he also took out a knife as he ran toward the priest," said Timbas Ginting.
"What's clear is that the pastor was threatened, and [there was] an attempt to hurt the pastor," Fahrizal, the head of criminal investigations for police in Medan, said.
Indonesia has the world's largest Muslim population and the vast majority practise a moderate form of Islam. But there has been a resurgence in fundamentalism during recent years, inspired in part by Islamist militant groups like al Qaeda and Islamic State.
Reuters / Newshub.