A Chicago mother has been charged with three counts of misdemeanor child endangerment after her 8-year-old son allegedly took her handgun to school, where it accidentally discharged and grazed another student.

The 8-year-old son of Tatanina Kelly, 28, allegedly found her 9mm Glock 19 handgun from under her bed on Monday night and put the gun in his backpack, where he brought it to school on Tuesday morning, according to FOX 32 Chicago.

Chicago police said that the handgun was accidentally discharged while in the backpack at around 10 a.m. in a classroom at Walt Disney Magnet School, striking the ground then ricocheting and grazing a classmate's abdomen, according to the report. The boy was taken to a local hospital where he's reportedly in good condition.

A teacher then grabbed the student's backpack and gave it to the school's security officers, who found the gun inside, according to prosecutors.

VIOLENT CRIMES ON THE RISE IN 2022, FOLLOWING PREVIOUS UNPRECEDENTED SPIKE IN MURDERS

Walt Disney Magnet School

Chicago police said that the handgun was accidentally discharged while in the backpack at around 10 a.m. in a classroom at Walt Disney Magnet School, striking the ground then ricocheting and grazing a classmate's abdomen. (Google Maps)

Kelly's bond was set at $10,000 and a judge ordered her to post $1,000 to be released from the Cook County Jail

Kelly's attorney admitted during a hearing on Wednesday that "the gun probably should have been locked up somewhere," but said that his client didn't intend for this to happen and noted she had no criminal record, stating this is a "one-time incident, not soon to be repeated."

"This wasn’t something she planned or something she did of her own volition," Clarke said. "How the kid knew there was a gun under the bed is beyond me. … It’s not like she went out and did something purposefully that violated that law."

FBI DATA SHOWS LARGE INCREASE IN MURDERS IN 2020 NATIONWIDE

Judge Michael Hogan said that the mother was "supremely negligent," adding that the situation could have ended much differently.

"We are inches away, possibly centimeters away, from a very different case and a very different tragedy," Hogan said.

"This may not have been an intentional act, but it is a supremely negligent act. We don’t know how [the child] knew the gun was under the bed … but he obviously did because he went and got it," Hogan said.

CLICK HERE TO GET THE FOX NEWS APP

Kelly's next court date is May 24.