Three suspected terrorists were taken to court on Thursday but were not charged as the prosecution requested 27 days to finish a probe.
Abdulaziz Sultan, Hamid Majid and Imran Hassan appeared before Malindi senior resident magistrate Yvonne Khatambi.
The investigating officer said they needed to collect phone records, laptops and mobile phones from Nairobi for analysis.
The officer said the suspects were being investigated on allegations that they were planning attacks. He said the process would cover Malindi, Mombasa, Garsen and Lamu.
An affidavit read by corporal Fatuma Kassim stated the case is sensitive and that suspects would intimidate witnesses if released.
Defence lawyer Yusuf Aboubakar had objected on grounds that holding the suspects on mere suspicion amounted to infringing upon their right of freedom.
Aboubakar noted there was no proof supporting their detention pending investigations.
The lawyer further questioned the arrest of the suspects and sought to know if the officer before the court took part in the operation.
Aboubakar also told the court that the suspects and their relatives were willing to cooperate with police.
But Henry Achochi, from the DPP's office, intervened saying the Anti-Terrorism Act allows police to hold suspects for 90 days amid investigations.
The lawyer requested that one of the suspects be taken to hospital and a family doctor allowed to examine him.
He said the suspects had been denied food and freedom to worship in custody.
The magistrate said she will rule on the suspects release on bond on Friday.
Khatambi remanded them to Malindi Police station and said they should be allowed to eat and pray.
She ordered the ill suspect taken to Malindi subcounty hospital and permitted examination by the family doctor.
The suspects were arrested on Tuesday night after police raided a house believed to be used by al Shabaab militants.
During the raid one suspect was gunned down and an officer was shot in the left hand and chest.