The police are holding 10 students who sneaked from their school to a girls dormitory in Nakuru on Thursday night.
The KCSE candidates from Anestar Bahati Boys sneaked into Anestar Precious Girls secondary school.
DCI director George Kinoti said the boys sneaked from their school in numbers and gained access to the girls when they were asleep.
After a few minutes, the girls raised an alarm which led to the arrest of the 10.
Kinoti said an officer had to fire in the air to scare away the defiant boys.
They are at Dundori Patrol Base, pending further interrogation.