The mother of a 7-year-old who took a handgun to his public elementary school in Queens was arrested on Friday, the police said.

The woman, Deborah Farley, 53, was charged with criminal possession of a weapon, endangering the welfare of a child, drug possession and several other weapons-related charges. Judge Mary R. O’Donoghue of Queens Criminal Court set her bail at $35,000. Ms. Farley is expected to return to court on Feb. 6.

Ms. Farley, according to the police, admitted on Friday morning that she placed a handgun, ammunition and a flare gun in her son’s Batman backpack on Wednesday night and then forgot to take them out before he went to school the next morning.

The police said the child did not know he was bringing the weapon to school, though he discovered that there was a gun in his bag before school officials were alerted and the weapon was recovered by the authorities.