The South African National Defence Force has been deployed to violence-hit communities in Cape Town.
The areas include Bonteheuwel, Delft, Hanover Park and Philippi East.
Local reports say the recent upsurge in violence is due to a turf war between rival gangs, fueled by retaliation attacks.
At least 20 people have been killed there since last Friday, including 13 who were shot dead in Philippi East at the weekend.
The office of Police Minister Bheki Cele said the deployment was part of “extraordinary” measures that needed to be taken to ensure public safety.
“We’ll go door to door, we’ll collect every illegal firearm, we’ll collect all criminals that we want, we’ll collect all outstanding criminals that have been on bail,” Mr Cele told the media.
There is currently heavy police presence in some of those communities as officers await the arrival of the army.
Cape Town’s gang-problem goes back many decades, while there have been periods of ceasefire, authorities have struggled over the years to maintain lasting peace in those communities.