A Nyeri court has ordered the lock-up of 41 Ethiopians and an American for seven days.
The foreigners were arrested in Kiganjo and Karatina towns without proper travel papers.
The 42 suspected illegal immigrants appeared before Nyeri Senior Principal Magistrate Phillip Mutua on Tuesday.
The prosecution requested the court to grant them more time to vet the foreigners who were intercepted on their way to Tanzania and South Africa.
The detention application was filed by Nyeri County Police Commander Ali Nuno, who said they were setting up a multi-agency taskforce to vet the suspects.