Indonesian police carry evidence after an attack at a church Sunday in Sleman, Yogyakarta province.
CNN  — 

A sword-wielding attacker slashed worshippers as they prayed at a church in Indonesia on Sunday, injuring five people, CNN Indonesia reported.

The victims included the pastor of the church, according to police officials. They said the congregation was praying when the attack happened at Santa Lidwina Church in the Yogyakarta province of Java.

Church security tried to prevent the attacker from entering the church, but he forced his way in, police officials told CNN Indonesia. Police opened fire on the attacker, who’s been hospitalized, it said.