South Africa police say the person who killed two worshippers at a South African mosque last month was a psychiatric patient with no link to extremism.

“The man had schizophrenia, we could not link him to any extremist or radical activity,” Hangwani Mulaudzi, spokesman for the Hawks police investigation unit, told AFP news agency.

The attacker, who was armed with "a big Rambo knife", had struck as people gathered in Malmesbury mosque, north of Cape Town, before refusing to hand over his weapon and being shot dead by police, PC Henry Durant told South Africa's News24.

After the attack, South Africa's Muslim Judicial Council said in a statement it was "shocked to its core to learn of a brutal attack", explaining the two victims had been observing I'tikaaf when they were killed.

I'tikaaf prayers are held over the last 10 days of the Muslim fasting month of Ramadan, Business24 explains.