NEW YORK (CBSNewYork) — Police arrested a student Thursday at a Brooklyn high school after he allegedly tried to bring a loaded gun into the building.

It happened around 9 a.m. at Automotive High School on Bedford Avenue near McCarren Park in Greenpoint.

READ MORE: Exclusive: CBS2 Cameras On Hand At Unannounced Security Screenings At Troubled New York City High Schools

The school safety agents union told CBS2 the 14-year-old student put his book bag through the X-ray machine, and agents found a loaded .38 caliber revolver inside.

READ MORE: Parents Demand Action After 5 Guns Confiscated At NYC Schools In 2 Days

The student was arrested, and no injuries were reported.

Last week, five guns were confiscated at New York City schools in two days. Mayor Bill de Blasio announced Monday the city would begin conducting unannounced screenings.

The safety agents union said Automotive High School has full time scanning.

CBSNewYork Team