South African police have launched a manhunt after gunmen killed at least 27 people in two mass shootings in Cape Town and Johannesburg.
The attacks unfolded in places people were gathering, at a tavern and an entertainment centre.
Police are yet to make any arrests for either incident.
The first incident occurred about 9:30pm local time on Saturday when eight gunmen armed with assault rifles entered a bar west of Johannesburg, killing 17 people and wounding 15 others.
Police said the suspects opened fire on customers drinking outside before moving inside where they continued to shoot.
The victims included 13 males and four females, police said.
In a statement posted by South African police on social media, the shooters "allegedly searched some patrons and took their cellphones before fleeing the scene in two unidentified motor vehicles".
Police are yet to confirm the motive for the shooting.
They said the suspects also criticized two vehicles after fleeing.
Early on Sunday during a separate shooting at an entertainment venue just outside Cape Town, gunmen killed 10 people and wounded 11 more.
Police said the shooters entered the venue near the town of Lwandle at 1:46am local time, and "shot at patrons".
Five of the victims were declared dead at the scene while the others succumbed to their injuries while being taken to hospital.
"Suspects were reportedly armed with AK-47 rifles and pistols," South African police said in a statement posted on social media on Sunday.
No suspect has been arrested in either case, police said.
A third attack on Tuesday night killed 11 people including a pregnant woman, after multiple gunmen opened fire at a house party in KwaMakhutha township south of Durban.
The attacks come as the country grapples with illegal firearms, gun violence and gang rivalries.
The country of about 62 million people records roughly 60 murders a day, among the highest rates globally.
In March, soldiers moved into violence hotspots in Johannesburg to support police efforts to tackle crime.
South Africa's President Cyril Ramaphosa described ongoing violence and crime as one of the biggest threats facing the country.
Despite ongoing military intervention to keep crime at bay, gun violence still remains a persistent problem.
In Johannesburg, 10 women have been killed in a single municipality in two months, the latest was found on Saturday partially unclothed and stoned to death.
A suspect has been taken into custody, police said.
The nine other victims were mostly in their 20s and 30s, with some found stripped of their clothes and showing signs of sexual assault.
Police have offered a 400,000 rand ($25,000) reward for information leading to the arrest of the killer or killers, while the Democratic Alliance, South Africa's second-largest political party, has put up a further $31,000.