More than 100 people arrested in the Kenyan port city of Mombasa have appeared in court on charges of membership of Somalia's Islamist militant group, al-Shabab, police say.
Police raided a mosque in the city on Sunday, saying militants were carrying out training there.
At least two people are feared dead in ensuing riots, which lasted hours.
Kenya has been under pressure to crack down on militants blamed for a spate of attacks, including the Westgate siege.
Somalia's al-Qaeda-affiliated al-Shabab Islamists have carried out a series of attacks in Kenya, in what they say is retaliation for Nairobi's decision to deploy troops to Somalia to hunt them down.
It said its militants stormed the Westgate shopping centre last year, sparking a four-day siege in which at least 67 people were killed.
In another development, four Somali men were charged with possessing explosives and attempting to commit a terrorist act after a small blast last month at the main airport in the capital, Nairobi.
Police initially said the blast was caused by an exploding light bulb.
During the Mombasa raid on the Masjid Musa mosque on Sunday, some youths raised a black flag associated with al-Shabab.
The 129 people arrested during the riots which followed were remanded in custody until Friday, when they will be asked to plead.
Police fired live rounds and teargas during the protests, and said they had been shot at.
Senior Mombasa police officer Henry Ondieki told the Daily Nation newspaper that youths had distributed leaflets on jihad at the mosque.
"This is not a mosque for prayers but a base for recruiting Muslim youths to engage in terrorist activities," he was quoted as saying by the newspaper.
The mosque is said to have attracted radical followers for a number of years.
In August 2012, unknown gunmen shot dead radical cleric Aboud Rogo, who used to preach in the same mosque.
He had been accused of recruiting and fundraising for al-Shabab. His death sparked days of rioting in the city, which has a large Muslim population.
Police seized laptops and DVDs in Sunday's raid.
One of those reported killed is said to have been a police officer.
A local rights group criticized the police action.
"There was no need for excessive force and the police should have restrained themselves to avoid bloodshed," the Associated Press quoted Khalid Hussein, an official with Haki Africa, as saying.