
Menacing: An immigrant holds his machete to his face as gangs clashed with police following the outbreak of violence in South Africa

Police battled to contain a wave of violence in South Africa last night as gangs of migrants armed themselves with machetes to fight off anti-foreigner attacks by locals.

Five people have died since vigilantes started looting and attacking shops owned by immigrants, mainly from other parts of Africa.

Police fired stun grenades and rubber bullets as immigrant gangs confronted the vigilantes, and last night in parts of Johannesburg officers formed a human barrier to keep the two sides apart.

More than 200 immigrants had to take refuge in a police station and dozens of businesses were closed when trouble spread just a day after a rally against xenophobia in Durban.

Immigrants have complained about a lack of protection from the authorities and some have started arming themselves to fight back.

Eyewitnesses have claimed that the vigilante violence is carefully orchestrated and that minibuses have been ferrying men armed with knives and machetes around suburbs.

In the past two weeks, shops and homes owned by Somalis, Ethiopians, Malawians and other migrants have been targeted, forcing more than 2,000 to flee to camps protected by armed guards.

In Johannesburg, Malawian immigrant Samuel Idrssa described how his friend was stabbed and set on fire by a mob.

‘We wanted to rescue him but there were too many of them,’ he said. ‘It was shocking.’

He added: ‘We have all left our homes. Those affected are those of us who live in poor townships because we live with poor South Africans who do not have jobs.’

So far, five people are believed to have been killed in the violent protests which started two weeks ago in Durban, a key port on South Africa's Indian Ocean coast, spreading to Johannesburg.

Violence flared days after Zulu King Goodwill Zwelithini said in remarks reported by local media that foreigners should 'take their bags and go'.

In a recorded speech sent to a local broadcaster, he said: 'We must deal with our own lice' and complained about foreign-owned shops. He has since said his comments were misinterpreted.

Addressing parliament in Cape Town on Thursday, President Zuma reiterated his condemnation of the violence, calling it a 'violation' of South Africa's values.

'No amount of frustration or anger can ever justify the attacks on foreign nationals and the looting of their shops,' he said.

'We condemn the violence in the strongest possible terms. The attacks violate all the values that South Africa embodies.'

Scroll down for video

Fighting back: Immigrants carrying machetes have clashed with police in a search for locals that attacked foreign shop owners in Durban

On the move: Police officers fire rubber bullets as they disperse the gangs of African immigrants who have fought back in South Africa

Armed: An African immigrant, in a jumper and tracksuit bottoms, firmly grips a machete as violence continued to flare in South Africa

Danger: A man in an Adidas tracksuit armed with an axe charges at a photographer in Johannesburg, cheered on by a crowd behind him

He also said the government was taking steps to secure its porous borders and making progress in setting up a Border Management Agency, announced last year and scheduled to be up and running in 2016.

The ruling African National Congress party has condemned the attacks as 'shameful' and branded them 'criminal acts against vulnerable people'.

The US ambassador to South Africa, born in Zaire - now the Democratic Republic of the Congo - to Haitian parents, spoke in defence of the immigrants.

'As an immigrant to my own country, my heart goes out to those who have been attacked for being different,' Patrick H. Gaspard said.

The Desmond and Leah Tutu Legacy Foundation, which campaigns for peace, warned: ‘The fabric of the nation is splitting at the seams; its precious nucleus – our moral core – is being ruptured.’

Gang: A group of immigrants brandishing machetes in a run-down area of Johannesburg prepare to defend themselves against the police

Unrest: The xenophobic violence that started in Durban two weeks ago has spread this week to Johannesburg and other areas of the country

Mob: South African hostel dwellers, some brandishing sticks in an aggressive manner, stage a demonstration against foreigners

Intimidation: A man holding a wooden stick and a shield stands outside a hostel during anti-immigration related violence in Johannesburg

Attacks: A gang of local men dressed in civilian clothing demonstrate against foreigners, with one whirling an axe in his right hand

On the run: A woman in a hat dashes off, flanked by other locals, after trying to rob a foreign motorist in Johannesburg

Smoke: A woman covered in soot gestures and shouts towards foreign nationals in the Jeppestown area of Johannesburg yesterday

Chaos: Men from the Jeppie Hostles roll over a torched car in the middle of the street in Jeppestown, Johannesburg

Divisions: A man with a hammer retrieves metal scraps from a burnt-out vehicle after foreign nationals torched a car in the early hours

Aftermath: A man carries an axe as he walks past a burnt out car in Jeppestown after more unrest in the early hours of yesterday morning

Weapon: A man clutches a brick in his left hand as the violence escalates across South Africa - five dead have already died

In the past two weeks, foreign nationals living near Johannesburg had to remove items from their shops and shut up their stores because of fears they could be targeted by protesters.

They fled after a mobile phone text message was apparently sent to shop owners, warning them to shut their premises, claiming that 'Zulu people are coming to town... to kill every foreigner on the road'.

Angry South Africans accuse immigrants of taking jobs in a country where unemployment and poverty levels are high - the official figure is 25 per cent but economists say, in reality, it is much higher.

Victim: Carol Lloyd was left injured and covered in blood after rocks were thrown at and shattered her car window following immigrant protests near Johannesburg in South Africa

Armed: South African police were called in to help foreign nationals as violent protests spread to Johannesburg, threatening more killings

People run for cover from a stun grenade and tear gas after a skirmish between locals and foreign nationals in Durban, South Africa

A group of foreign nationals threaten to defend themselves as police get between them and South Africans after a peace march in Durban

In Actonville, South African men were seen singing, armed with clubs and pieces of wood, as they called for foreign shop owners to leave

Police responded to the violence in South Africa by firing tear gas grenades as they began to enter men's hostels to search for weapons

South Africa has a population of about 50 million, but an estimated five million immigrants and its high jobless rate, widespread poverty and glaring income disparities make it a ripe candidate for outbreaks of anti-immigrant violence.

Johannesburg was the epicentre of the 2008 xenophobic attacks that killed more than 60 people and saw violence spread through the area.

The governments of Malawi and Zimbabwe have begun efforts to repatriate citizens affected by the attacks.

Police entered hostels in Actonville in Johannesburg looking for weapons and are seen holding suspects at gunpoint

A man is searched by a police officer for weapons as fear intensifies in Johannesburg over the violence towards foreign nationals

The violence in South Africa has been condemned by leaders and officials as more foreigners are being forced to leave their stores and homes

Riot police, armed with guns, ammunition and wearing helmets have been clashing with protesters as they try to ensure safety

A child looks out from inside a deserted store in Germiston, near Johannesburg after the immigrant owner removed his goods and left in fear of attack from local residents

Foreign nationals have been seen loading trucks with their goods as they flee Primrose, near Johannesburg to escape the violence

Shop owners fearing for their lives have been seen emptying their stores while armed police officers stand guard to protect them

Hundreds of people took part in a peace march after anti-immigrant violence flared in Durban. Meanwhile, foreigners fled their homes

Peace: Thousands of people took part in a peace march, calling for an end to the violence against immigrants in South Africa

A woman holds a poster while taking part in a peace march in Durban yesterday as the president calls for an end to the xenophobic violence

A peace march against xenophobia took place in Durban yesterday as foreigners fled their homes and businesses in fear

Police have repeatedly clashed with protesters who are threatening violence, looting stores and setting fires in KwaMashu and Umlazi

Fleeing: Foreign nationals loaded up trucks with their belongings and made their way out of Johannesburg, fearing more attacks

Shelves have been left bare in one shop in the village of Primrose near Johannesburg after foreigners fled their homes and businesses

A man carries bottles of drink that had been on sale in a store after foreign nationals decided to flee Primrose, fearing for their lives

Two men are pictured carrying a refrigerator as foreigners flee their homes and businesses as protesters make them fear for their lives

A child joins a queue at a shelter for displaced foreigners near Johannesburg after overnight attacks between locals and immigrants

Refuge: Earlier this week foreign nationals, who were forced out of their homes, took refuge at camps in Isipingo in south Durban

Handouts: The foreigners, including children, were provided with food by the local community after they were threatened with violence

Fear spread throughout South Africa after people received text messages warning them they would be attacked or killed if they stayed