Ethnic Somalis, some armed with machetes, hurled rocks at their attackers, who responded with sling shots and stones. Paramilitary police fired volleys of teargas as they tried to prise the battling factions apart.
"We are trying to create a buffer zone so that people cannot cross over," Nairobi regional police commander Moses Ombati told reporters, pointing to a road that he said formed a rough boundary between the two communities.
"These people are neighbours and business partners who need each other, so I don't think it will last long," he said.
Authorities have blamed Somali militants and their sympathizers for grenade and gun attacks in Kenya since Nairobi sent soldiers into neighboring Somalia last year to drive out al-Shabaab rebels, an Islamist group linked to al Qaeda.
Attacks have intensified since Kenyan and African Union forces launched an offensive seven weeks ago against al Shabaab's last major urban stronghold, the Somali port of Kismayu, forcing the rebels to flee.
Two Kenyan soldiers were shot dead in the eastern town of Garissa, which is a rear base for Kenya troops fighting in Somalia as part of the regional African Union force.
Somalia-related violence and growing separatist sentiment in its Indian Ocean coastal strip have added to security concerns ahead of March presidential polls in a country where 1,200 died in post-election violence in 2007.
In the Eastleigh district of the capital Nairobi, crowds poured through the streets chanting "Somalis must go!", hurling rocks and smashing windows of some Somali apartments.
Rioters jeered police who fired warnings shots in the air, demanding the government improve security in a district that has borne the brunt of the grenade and gun attacks.
Streets in Eastleigh, a congested residential and business area, were strewn with rocks and shattered glass. Shops shuttered their windows and most business were closed in one of Nairobi's busiest trading centers.
Crowds stood on the rooftops and the streets, while some ethnic Somalis gestured for assistance through their windows.
"These Somalis are getting used to this. Every day there is a grenade attack," said Evans, a Kenyan resident of the area, wearing sandals and a dirty t-shirt with a print of Che Guevara.
Children in school uniform and their parents ran from school after being trapped in unrest. Others ran with hands in air as police began arresting suspects. At least a dozen Kenyan men lay face down in one truck.
Local businessman Godfrey Biketi who supplies meat to Eastleigh, urged his fellow Kenyans to be calm.
"They should just chill. They're our neighbors," he said of the Somalis. "Even our country is fighting a war in Somalia. Now our country is becoming like theirs, it's not cool," he said.
The Muslim Human Rights Forum said in a statement that even if the suspects responsible for Sunday's bombing were proven to be Somalis, it did not mean the whole community was involved.
"The xenophobic attacks must be stopped at all costs lest they escalate to unmanageable mayhem at grave costs to the nation," said the group's chairman Al-Amin Kimathi.