BROOKLYN - A student was taken into police custody Thursday morning after authorities say he tried to bring a loaded gun into a Brooklyn school.

Police say a metal detector went off as the 15-year-old student entered the Brooklyn School for Career Development on Claremont Avenue. Thursday marked the first day of classes.

Safety officers in the school say they found a loaded .22-caliber gun inside his backpack. They then called police.

No one was injured.

Police say charges against the student are pending.

The city's Department of Education responded to the incident by saying, "This incident is deeply troubling and the NYPD immediately responded and safely confiscated the weapon."