A Dorchester student apologized Friday after allegedly bringing what classmates thought was a handgun to school.

The weapon, found stuffed in a toilet tank at the Dorchester Collegiate Academy charter school, was actually a .177 caliber paintball gun that did not have an orange tip at its end, police said.

The juvenile suspect’s classmates reported seeing the weapon and told school staff, according to a police report.

RELATED: Fake gun-carrying man 'really lucky' to be alive: Boston cops

Police arrested the boy, who has not been identified because he is a minor, at the scene, according to the report. He now faces charges for possession of a firearm on school grounds, assault by means of a dangerous weapon and intimidation of a witness.

Boston Police Commissioner William Evans said the boy “expressed remorse” and said he hoped “he and his family can use this as a learning experience.”