JOHANNESBURG — At least 27 people have been killed in two separate mass shootings in South Africa, with the attacks occurring just hours apart at venues near Johannesburg and Cape Town.

The first shooting happened late on Saturday in Wedela township, where eight armed men reportedly opened fire at a bar, killing 17 people and injuring at least 15 others.

According to police, the attackers, armed with AK-47 rifles and pistols, first targeted people outside the venue before entering and continuing to shoot.

The victims included 13 men and four women.

The gunmen allegedly searched some victims and took their mobile phones before fleeing in two vehicles.

Two other vehicles were reportedly set alight during the attack.

About four hours later, another shooting occurred in Lwandle, on the outskirts of Cape Town, leaving 10 people dead and 11 injured.

Witnesses said people had been dancing and singing at a crowded outdoor entertainment venue when gunfire suddenly erupted.

Witness Kamvalethu Galada told Reuters she initially mistook the sound of gunshots for fireworks before people began dropping to the ground.

Police have deployed specialised units to both areas as investigations continue.

No arrests had been reported, and authorities were still working to establish the motives behind the attacks.

Initial investigations suggested that one shooting could be linked to a turf dispute involving illegal miners, while the other may have stemmed from a business rivalry, according to police.

President Cyril Ramaphosa said police had obtained images of suspects linked to the Wedela attack and were working to track them down.

The shootings come just days after another attack in KwaMakhutha, near Durban, where 11 people were killed after three gunmen opened fire at a property.

South Africa has long faced high levels of violent crime, with authorities and experts increasingly linking mass shootings to organised criminal activity.

Following the latest attacks, Ramaphosa said, “This cannot go on like this,” calling for intensified efforts by security forces to tackle violent crime.