South Africa will shortly deploy a battalion of soldiers to help police quell a surge in violence in gang-infested parts of Cape Town, a step normally only taken over the Christmas and New Year period when crime spikes in poorer neighbourhoods.

Recent bloodshed in mainly poor black and mixed-race areas was likened to a "war zone" by a provincial official this week, with some 2,000 people killed since January.

Communities in those districts often bear the brunt of violence in a vast area called the Cape Flats, where high rates of unemployment and drug abuse have fuelled gang activity.

"The South African National Defence Force will deploy a battalion with support elements during Operation PROSPER," the Defence Ministry said in a statement on Friday.

The deployment of several hundred soldiers to unidentified crime hotspots will happen from July to October. It follows a visit by Police Minister Bheki Cele to the Philippi shanty town on the Cape Flats after several killings last week.

In a crime last Friday that made national headlines, six women between ages 18 and 26 were killed when unknown gunmen entered a home and opened fire.

The next day, another five men, aged 18 to 39, were shot dead and one was injured in two separate shooting incidents in Philippi, said Albert Fritz, a Western Cape provincial official tasked with ensuring community safety.

"In the Western Cape, 1,875 people were murdered in the past six months alone. This means that many of our most vulnerable residents in the province are living in a war zone," Fritz said after more than a dozen murders over one weekend last month.

Military an 'unsustainable response': analyst

Known mainly for its stunning tourist attractions, including Robben Island and Table Mountain, Cape Town also has some of the country's highest murder rates.

In places like Philippi or Khayelitsha, the largest black shantytown about 30 kilometres from the city centre, tens of thousands of people live cheek by jowl in a squalid sea of shacks — unnumbered homes on nameless streets that are perfect for criminals and a nightmare for police.

But, deploying the army, which occurs regularly over the festive season when crime spikes and soldiers back up normal policing activities, is not a lasting solution, analysts said.

Gareth Newham at the Pretoria-based Institute for Security Studies said: "It is a short-term, unsustainable response to a crisis."

In a report this year by the The Citizen's Council for Public Security and Criminal Justice of the world's most dangerous cities, the only three not from the Americas in the top 50 were in South Africa, with Cape Town at 11th overall with a homicide rate of 66.36 per 100,000 residents.

Earlier this century, the rate in Cape Town hovered for several years at fewer than 45 homicides per 100,000 people.