HONG KONG — Hundreds of students marched through a Hong Kong campus on Monday and broke the glass on several doors to protest the arrest of a college reporter who was taken into custody during a rally this weekend for carrying what his school’s president described as a table knife.

The reporter, Boaz So, a journalism student at Hong Kong Baptist University, was carrying the knife in his bag while covering pro-democracy demonstrations on Sunday because he had been eating cake with classmates to celebrate the Mid-Autumn Festival, the university’s president, Prof. Roland T. Chin, wrote in an email to students on Monday. Chinese people traditionally commemorate the holiday by eating mooncakes, a kind of rich, round pastry.

“We have been in touch with the police and have urged them to ensure that the case is handled properly and fairly,” Professor Chin wrote in the email. Mr. So was released on bail Monday evening, according to Bruce Lui, a lecturer at the university who was helping Mr. So with his case.