Muslim worshippers at a Malmesbury mosque, where two people were killed and two others injured on Thursday morning, apparently thought the attacker needed a place to sleep and didn't want to turn him away.
Activist Imraahn Mukaddam, who is a relative of one of the deceased, said worshippers were at the mosque for Itikaaf - a religious practice where men live and pray at the mosque for the last 10 days of the Islamic holy month of Ramadan.
Mukaddam said, based on his discussions with worshippers, they had told him that the attacker had introduced himself as Somali, and said he was on his way to Vredenburg on the West Coast.
The man asked for somewhere to overnight and, even though the Somali worshipers present felt a twinge of unease because his dialect was different, it would have been unthinkable to turn him away during Itikaaf.
The two dead men - Ismail Bassa, 74 and a Somali national, whose name is being withheld until his family has been informed - were also in the mosque for Itikaaf. Mukaddam is a cousin of Bassa.
Malmesbury Police Constable Henry Durant told News24 that, at about 03:00, the man just got up and started stabbing people.
Fellow worshippers said there was no warning that the suspect, believed to be a foreign national in his 30s, was about to commit the violent crime.
"There was an old man and he tried to cut the old man's head off and the man died. Other people went to the Swartland hospital," said Durant from the scene earlier.
"This guy was not in a hurry - he was very calm - he did not run, he walked away. He had a big Rambo knife," he said.
'He was very intellectual, a beautiful personality'
The attacker apparently also tried to stab a police vehicle before he was shot dead.
His body lay in a muddy field near a police vehicle, as forensic workers combed the scene in the rain.
Police spokesperson Lieutenant Colonel Andre Traut said the suspect had charged at the police when they 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. His death will be investigated by [the Independent Police Investigative Directorate]."
Mukaddam said his cousin was a beautiful person, dedicated to serving his religious community.
"He was very intellectual, a beautiful personality and very conscious of his religious values," a grieving Mukaddam told News24.
Mukaddam said his mother had called him with the news early on Thursday, so he rushed to his cousin's house next to the mosque in the quiet town.
When he got there, Bassa - a retired sales rep in his seventies - was dead, and Bassa's son Faizel had been stabbed.
News24 reporter Jenna Etheridge spoke to Bassa's son Saud, who said it was an "unknown guy" who had asked for shelter for the night.
"The guy stabbed my brother as well," he said.
'God gave him an honourable death in a place of worship'
Mukaddam told News24 that the family only had one shred of solace, as they prepare for a funeral instead of the celebratory preparations for Eid. The day, which marks the end of the holy month of Ramadan, is expected to be celebrated on Friday.
"We're making peace with the fact that we have lost a loved one and that... God gave him an honourable death in a place of worship, whilst in a state of worship. That is a consolation for the family," said Mukaddam.
However, although grieving, Mukaddam was also extremely concerned about the wider ramifications of the tragedy.
"We started Ramadan with a similar attack and we're ending Ramadan with attacks, so clearly there is an agenda behind it," he said, referring to the mosque attack in Verulam in KwaZulu-Natal several weeks ago.
That shooting laid bare apparent disputes between some branches of Islam, and an attempt has been made to establish a "Cape Town Accord" to unite Muslims to be tolerant of differences of opinion, and to not escalate intra-faith differences.
The African National Congress in the Western Cape condemned "in the strongest possible terms" the attack, and had dispatched a team, including provincial secretary and elections coordinator Faiez Jacobs and Ebrahim Rasool, to assist.