Two suspected Al-Shabaab militants, who were arrested in October during a multi-agency security raid in Likoni, will remain in police custody until their case is concluded.
Mr Bakari Chimbonja and Mr Athuman Nyae are accused of planning a massive terror attack at the Coast.
A Mombasa court denied them bond on Monday, saying they were likely to flee and disrupt investigations.
Senior Resident Magistrate Rittah Amwayi also said they were a threat to national safety, security and peace.
“I am persuaded and convinced that if released on bond at this stage, the accused will fail to appear for their trial and will likely to interfere with investigations and witnesses,” she said.
She noted that suspected terrorists killed 11 General Service Unit (GSU) officers using an Improvised Explosive Device (IED) planted on Degoh Road in Garissa County in October.
“The court also recognises the impact of transnational organised crimes like the ones the accused persons are facing, which have serious impact on the national security, safety and peace," Ms Amwayi said.
She added, "I find that the prosecution has established that there exist compelling reasons to deny the accused bond pending trial."
Mr Chimbonja and Mr Nyae denied three terror-related charges including harbouring terrorists and being members of the militant group.
The charge sheet says that they harboured Swaleh Yusuf, Abdalla, Salama Salim Mohamed and Mkubwa Sadi Ramadhan, who are all dead, knowing they intended to commit an act of terrorism.
They are further accused of giving support for the commission of a terrorist act.
The State also says the suspects provided accommodation to the deceased militants in full knowledge of their plans.
The two pleaded not guilty to the offences the State claimed they committed on October 1 in Likoni, Mombasa County.
Ramadhan, who was killed during the raid had been charged with several terror-related offences including being a member of the terror group.
He was, however, acquitted by the court for lack of evidence.
While asking the court to deny the suspects bond, State Counsel Erick Masila claimed the militants deployed the suspects to attack key government installations in Mombasa, including during Mashujaa Day celebrations on October 20.
The State said Mr Chimbonja was in the Anti-Terrorism Police Unit's database and that it was revealed that he earlier featured in a terrorism-related incident in Mombasa.
The court was also informed that the two suspects committed a number of other terrorist acts and harboured militants who have attacked the country in the past.
The prosecutor also said key witnesses in the case were vulnerable and yet to be placed in the witness protection programme, hence the need for the suspects to be detained.
Detectives added that they were investigating the suspects for offences including money laundering.
The case will be mentioned on December 17.