His security detail was, however, able to quickly get him out of harm’s way, and as the last of the police escorts rounded the corner, all hell broke loose.
The youths launched their rocks at the school in frustration at what they said was a government that had refused to listen to them, sending journalists, pupils and teachers running for safety.
The rowdy mob was unable to gain access into the school.
They claimed that the journalists were instruments of government propaganda and threatened to damage their equipment.
Inside the school, the pupils gathered in small clusters and waited for the violence to abate so that they could leave.
Police arrived minutes later and what started as a protesting mob of tens of youths escalated into a full-blown battle, as policemen used tear gas to disperse the youths who retaliated with more rocks.
Pupils attempted to leave the school several times but the clashes right outside their gate sent them running back for cover.
The stalemate finally came to an end around 40 minutes later, when heavily armed policemen lined the streets and formed a protective layer around the journalists and the pupils who were finally safely escorted out of the school.
Dr Matiang’i and Mr Boinnet had earlier assured the KCPE candidates and their invigilators that there was adequate security for the examination to take place.
Kawangware has experienced bouts of violence since Friday as Jubilee and Nasa supporters clashed over the October 26 repeat poll.
Six people have so far died in the clashes.
Already, the ministry has identified Kawangware, Kibera and Mathare as areas that are troublesome and deployed additional security officers.