South African police have shot dead a man who stormed a mosque and stabbed two worshippers and leaving several others wounded.

The incident took place in Malmesbury in the Western Cape in the early hours of Thursday morning, online reports claim.

Provincial police spokesperson Lieutenant Colonel Andre Traut said police were called to the scene in the early hours of June 14 and found two people stabbed to death while others seriously wounded.

“A couple of hours ago – about 03:00 – as people got themselves ready to pray, the suspect just got up and started stabbing the people. He was praying with them,” Malmesbury Police Constable Henry Durant told News24.

Fellow worshippers told police that there was no warning that the man who is believed to be in his 30s was going to commit such a violent crime.

“This guy was not in a hurry – he was very calm – he did not run, he walked away. He had a big Rambo knife,” said one eye witness from the scene.

It is said that when police got to the scene, the suspect was still there and tried to attack the police with his weapon. He was shot and killed in the process.

Meanwhile, police reported that they would investigate the matter and also find out the motive for the crime.