Several students of Kanjuri Boys High School in Mathira, Nyeri were injured on Friday evening during a confrontation with villagers and police who thwarted their attempt to burn a school building.
Local chief William Kihu said residents stormed the school at around 9pm in response to calls for help after the students went on the rampage and started pelting classrooms with stones, destroying window panes.
Swift action by the villagers and the police, who arrived minutes later, prevented further damage after they overwhelmed the rioting students.
Students were forced to flee from the school, with an unknown number injured in the ensuing melee.
At least 10 students were treated at the Karatina Level IV Hospital and discharged.
Security was beefed up at the neighbouring Gatondo and Magutu Girls Secondary schools when word spread that the boys were headed there.
The incident happened the same day three Form Two students from the school were arrested and arraigned in Karatina.
They were charged that on July 20, at Kanjuri Boys High school, they were found in possession of dangerous weapons with an intention to commit a felony, namely to destroy school property.
They denied the charge and were freed on Sh50,000 cash bail or bond of Sh100,000 each failure to which they would be remanded at Nyeri Juvenile Remand Prison until September 5 when the case will be heard.
It was not immediately clear if the night fracas was linked to the arraignment.
Scores of the students, who reportedly spent the night in the bushes, could be seen loitering in Karatina town on Saturday morning.