Two men were on Tuesday charged with travelling to a terrorist designated country, failing to report their departure to government authorities and sneaking out of Kenya.
Mr Idris Opwora Wesonga and Mr Joseph Juma Odhiambo allegedly committed the crimes between October and November.
The court heard that they did not report their exit to Somalia at any immigration office in the country.
They were also charged with crossing into Somalia at an undesignated location.
Police records state that the two left Mumias for Mandera in October and rented a house where they stayed for a week before crossing into Somalia.
It is suspected that they were heading to Baidoa to join terror group Al-Shabaab.
After crossing the border into Bulahawa, they allegedly hired a taxi to take them to Baidoa.
It was then that officers in the Somalia National Army arrested and handed them to the Kenya Defence Forces, whose troops are fighting the terrorists under the African Union Mission in Somalia (Amisom).
The KDF handed them over to the Anti-Terror Police Unit in Mandera which preferred the three charges against them after investigations.
The police report indicated that Mr Wasonga and Mr Odhiambo had East African passports but they were not stamped to legalise their travel to Somalia.
They also had driving licences and Kenyan national identity cards.
The suspects denied the charges before Mandera Principle Magistrate Peter Areri.
The case will be mentioned on January 10, 2020 for a ruling on their release on bond.