An 11-year-old New York City boy sneaked a loaded gun into his Queens elementary school Tuesday police said.

Police were called to PS 40 in Jamaica, Queens, at about 1 p.m. Tuesday after school safety officers found a loaded 9-millimeter High Point gun in the boy's backpack, police said.

Other students had alerted the safety officers.

The gun belonged to the boy's grandfather, 54-year-old Kenneth Miley, according to police. Miley was arrested on criminal possession of a weapon, child endangerment and other charges.

Attorney information for Miley wasn't immediately available. He is being held in lieu of $30,000 bail.

At the address listed for Miley, a man whom neighbors said lived at the home with his family, refused to comment and threatened to throw a garbage can at an NBC 4 New York photographer.

No charges have been filed against the boy.

The Department of Education said in a statement it was working with police to investigate the "disturbing" and "alarming" incident, and that the school notified families on Tuesday and were providing additional staff to provide ongoing support.

But one parent at the school Wednesday was upset at school officials, saying he was never notified of the alarming incident. Instead, Anthony Armstead said he found out from his 8-year-old son.

"That could have been one of my kids killed," said Armstead.

The union that represents school safety officers warned that more incidents like this are on the horizon if a proposal to remove metal detectors and scanners from schools is approved.

"You're going to see more firearms, more knives," said Derek Jackson of school safety officers' union Local 237. "People get injured. God forbid people get killed."

The mayor's spokesman responded in a statement that Mayor de Blasio "believes that we must look closely at school safety data and determine a clear protocol before examining the removal of scanners."

Metal detectors are not in use in elementary schools but officers can scan kids if they become suspicious.

"It's crazy for an elementary school," said parent Reynaldo Toro. "I don't even know how to feel about that."