South African Police Service spokesperson Capt Nqobile Gwala said police were on the scene and were trying to confirm details. There are usually few people at the mosque at this time.
It was too early to comment on the circumstances of the attack, said Nick Piper, a director at Signal Risk, an Africa-focused risk management firm.
"There were three people in the mosque - a caretaker, a worshipper and the imam and they were held up by three armed men", Herbst said after visiting the scene.
South Africa has not been a target for militant attacks of the kind that occur in some other African countries.
"So the moment we make examples and we start using the aspect that this has happened in Pakistan and other places, we might be giving an impression that this is necessarily so", he said. About 1.5 percent of the country's population is Muslim.
"Before the assailants left the mosque, a petrol bomb was thrown into the mosque and it was set alight".
One of the three victims died on the way to hospital while the motive for the attack remains unclear.
A section of the mosque was set ablaze and smoke was billowing from the side of the building, Balram said. One witness told reporters that the mosque looked "like a slaughterhouse". "There have been theft and robbery incidents at mosques before, but not like this, when nothing appears to have been taken". "I do not think we should jump to conclusions that this attack is motivated by sectarianism", Haseen told Voice of the Cape.
The remaining two victims are still in a critical condition. "Speculation about the motive is quite risky at this point".
Parliament's Portfolio Committee on Police also condemned the attack and called it shocking.
"A mosque is a religious institution, and South Africa's Constitution guarantees and protects the right to religious practices", Beukman said.