The customers were protecting the foreigners who they said offered cheap prices. The traders, however, complain that the Somalis are driving them out of business.
Somali shopkeepers in the Ramaphosa informal settlement east of Johannesburg have complained for some days of threats and intimidation from local competitors.
Last week Somali traders in the south-eastern city of Port Elizabeth were driven out by local businessmen who looted 58 of their shops.
Ramaphosa settlement was a hotspot three years ago when more than 60 people died in xenophobic attacks.
Yesterday local residents of the settlement said they would boycott South African-owned businesses if the Somalis were forced to leave because the foreigners offered better prices and service.
Police are adamant that these latest disturbances are business feuds and not xenophobia.
The lethal attacks of 2008 were a serious embarrassment to the African National Congress-led government.
During the apartheid era thousands of ANC cadres were given refuge in the very countries whose nationals came under attack by South Africans.
Democratic South Africa has become a magnet for refugees from African troublespots like Somalia, the Democratic Republic of Congo and particularly Zimbabwe.
Some locals complain they take jobs, services and housing from them. The government is seeking to establish the numbers and whereabouts of the migrants and regulate them.