By Aidan Gardiner, DNAinfo Reporter/Producer

WAVECREST — The mother of a 7-year-old boy who brought a handgun to his Queens elementary school has been arrested, police said Friday.

Deborah Farley, 53, was taken into custody after her second-grader carried a .22-caliber gun and an orange flare gun in his backpack into Wave Preparatory School at 535 Briar Pl., near Collier Avenue, Thursday morning, according to the NYPD and the Department of Education.

The boy passed the flare gun to another unidentified student, cops said.

When school officials were notified that the weapons were on the grounds, they threw the entire building on lockdown, an education spokeswoman said.

Authorities retrieved the guns without incident. No one was injured, police said.

But investigators determined that the weapons belonged to Farley, who lives near the school.

She has been charged with criminal possession of a weapon, possession of a weapon on school grounds, and endangering the welfare of a child, police said.

She was also charged with unlawful possession of a weapon because she didn't have proper documents for the gun.