University students threw rocks at police in Kenya's capital as authorities fired back with tear gas in running battles that only ended when officers cornered students in a campus building.
Students demonstrated in at least four cities across the country over a proposed increase in university fees. But the protest by students from the University of Nairobi, which sits just across the street from the central business district, was the most violent.
An Associated Press photographer said that several hours into the back-and-forth exchanges, police chased the students into university classrooms and fired tear gas inside.
Some people tried to leave the gas-filled rooms with their hands up but police chased them back inside, sometimes beating them with batons. Staff members who were caught up in the fray and the students were eventually allowed out.
A police spokesman did not answer a telephone call seeking comment. A police Twitter feed said the demonstrations had "largely dissipated and order has been restored".
One of the demonstrating students, Titus Khaemba, said he was angry class fees could rise. He noted that terror attacks have been on the rise in recent weeks leading to the evacuation last week of hundreds of British tourists from Kenyan beaches. He said security forces should be concerned with that and not targeting students.
"Right now there is no employment along the coast and the government is not looking into that. They are looking at how to get the money for the next election," Mr Khaemba said.