Somalia has sent a formal letter of protest to Kenya after 12 MPs and other government officials were arrested by police investigating riots in Nairobi on Friday.
All but one of the MPs have now been freed. About 300 people were picked up in raids on Nairobi's Eastleigh area, where many ethnic Somalis live.
Prominent Kenyan Muslim leader Al-Amin Kimathi was also arrested.
The raids followed violent clashes in Nairobi between police and groups angry at moves to deport a Muslim cleric. At least one person was killed.
Kenyan Internal Security Minister George Saitoti has accused a Somali Islamist group, al-Shabab, of links to the clashes.
However, al-Shabab has told the BBC it was not involved.
Muslim groups in Kenya have long complained that they are being unfairly targeted by the police, with many Muslims arrested and accused of terrorist offences before being released for lack of evidence.
The BBC reports many Somali officials are based in Kenya because of a lack of law and order at home. The Somali government controls only small parcels of territory, mostly within the capital, Mogadishu.