Police with the National Police Mobile Brigade unit fired a warning shot into the air and ordered passengers to get off the roof of a train Thursday at the Depok Lama train station in West Java, The Jakarta Globe reported.
However, hundreds of passengers allegedly attacked and injured officers, who escaped to the station office.
"I saw the passengers directly attack them," said Dwi Purwanto, head of Depok Lama train station. "The passengers were upset because they were asked to go down [from the train roof]."
The mob also attacked the station office with stones and broke windows.
"There were some station officers who were also [attacked]," Dwi said. "No one was brave enough to ask them to stop. Even the vendors ran away."
The passengers got back on the train and continued their journey to Bogor.
A university student and a high school student were arrested for allegedly being involved in the incident, Detik.com reported.
Mateta Rizalulhaq, a spokesman for Kereta Api Indonesia, the company that operates the train, said it has hung concrete balls above railroad tracks to deter train rooftop riders.
Rizalulhaq said rooftop passengers could no longer be tolerated.
Cameroon claims Boko Haram leader Shekau killed
Moscow anti-war rally draws thousands