The protesters marched through the streets and chanted slogans denouncing the East African bloc and the U.N.-backed Somali government. They also denounced neighboring Ethiopia, which withdrew from Somalia last year after a fighting insurgents for nearly three years.
The leaders of the militant group al-Shabab called for Somalis to prepare for a holy war against new troops.
Yusuf Ali Heydar, an al-Shabab leader, called for African nations to take back pledges of troops.
About 6,000 African peacekeeping troops are deployed in Somalia. The East African bloc this week pledged 2,000 more.