Medan: A knife-wielding man stabbed a Catholic priest and tried to set off an explosive device at a church in Indonesia on August 28, in the latest attack on religious minorities in the world’s most populous Muslim country.

Fr Albert Pandiangan was offering Mass at church in Medan, a city on the western island of Sumatra, when a young man approached him and stabbed him in his left arm, said local chief detective Nur Fallah.

The attacker was carrying a homemade explosive device, the police officer added.

“Somebody tried to kill the priest by pretending to attend the church service and at that time tried to explode something, like a firecracker, but the firecracker didn’t explode, it only fumed,” Fallah told reporters.

The priest suffered slight injuries and has been taken to hospital for treatment.

A picture of the attacker’s ID card circulating online said he was Muslim.

In recent years there have been a number of attacks on religious minorities and others in Indonesia.

In January this year, a suicide attack in the Indonesian capital of Jakarta killed four attackers and four civilians, and wounded 19.

In July a suicide bomber linked to the Islamic State group blew himself up outside a police station in Central Java.

Churchgoers on Sunday quickly caught the attacker and called the police.

An eyewitness, Markus Harianto Manullan, said the assailant wore a jacket and carried a bag.

“He sat in the same row as I did… I saw him fiddling with something in his jacket, and then I heard a small explosion and he immediately ran to the podium,” Manullan said.

Police are still investigating the man’s motive.

Parishioners also took to social media to pay tribute to the priest’s work in the community.