The suspects were among 104 people arrested last week in connection with riots that occurred after a police raid at the Masjid Mosque in Mombasa, Standard Digital News reported. The rest were released Tuesday night, the news website said.
During their arraignment, prosecutors argued against releasing the defendants on bail, alleging they were security threats.
The suspects were arrested Feb. 2 after the raid on the Masjid Mosque, where authorities said terror attacks were being planned, China's Xinhua News Agency reported.
Police said confidential documents were discovered, as well as laptop computers said to contain information about operatives with al-Shabaab, a Somalia-based extremist group.
At least five people, including a police officer, were killed during the raid, which sparked four days of street protests.
The judge remanded the suspects until a Feb. 26 hearing.
2014: The Year in Music [PHOTOS]