Two people were stabbed to death on Thursday at a mosque in South Africa’s Malmesbury in the Western Cape before the attacker was shot dead by police.

“Attack at a mosque in Malmesbury leads to 3 deaths. Provincial detectives are currently combing the scene for clues,” the South African police service said on its official Twitter feed.

Police said a man entered the building during morning prayers.

Police say an officer responding to the incident shot and killed the suspect.

Three people including a police officer were injured.

The Muslim Judicial Council said in a statement confirmed that two people have been killed whilst in I’tikaaf and another regular musallee of the Masjied were injured.

Western Cape police spokesman Lieutenant Colonel Andrè Traut said detectives are currently combing the crime scene for clues.

“The suspect, believed to be in his thirties and armed with a knife, was still on the scene and charged at the police who tried to persuade him to hand himself over.

“He ignored the calls and tried to attack police. He was shot and killed in the process,” said Traut.