(CNN) Rambunctious third-graders filled a classroom in Seattle on a crisp autumn day. One of the students dropped his backpack, and horror ensued.

That student had brought a parent's gun to school and was carrying it in his backpack. When the bag fell to the floor, the impact caused the gun to fire, sending a bullet straight into another student's abdomen, said Dr. Thomas Weiser, a trauma surgeon at Stanford University Medical Center.

Weiser treated that third-grader's gunshot wound while completing a fellowship at Harborview Medical Center in Washington in 2011.

When the student arrived at the hospital, awake and alert with a bullet hole oozing blood just below her heart, she had a jarring expression of confusion in her brown eyes, Weiser said.

"She kind of had this look in her eyes. It wasn't pain. ... There was obviously a little fear ... but I remember, my impression was (she had) this question: Why is this happening? She couldn't really process everything that was happening to her and around her," Weiser said. "She survived, but she had a terrible injury."

Now, a study based on data from 2012 to 2014 suggests that, on average, 5,790 children in the United States receive medical treatment in an emergency room each year for a gun-related injury. About 21% of those injuries are unintentional, similar to the third-grader's case.

From 2012 to 2014, on average, 1,297 children died annually from a gun-related injury in the US, according to the study, published in the journal Pediatrics on Monday.

The study also revealed which states in the US saw most of those deaths among children and which children may be most at risk for a gun-related injury.

"When you start putting numbers like that to real lives, real people every day who are injured by firearms ... it confirms a statistic we already know a lot about," said Weiser, who was not involved in the study.

Doctors also emphasize that there are methods available to safely secure and store firearms, away from children, and they recommend that parents employ those methods when keeping guns in the home.

Boys and guns

The researchers examined national data on fatal firearm injuries from death certificates in the Centers for Disease Control and Prevention's National Vital Statistics System database.

For nonfatal firearm injuries, the researchers examined data from the US Consumer Product Safety Commission's National Electronic Injury Surveillance System database.

Specifically looking at deaths and injuries among children up to age 17, the researchers analyzed the data for trends that may have occurred from 2002 to 2014.

They found that, among the deaths, 53% were homicides, 38% were suicides, 6% were unintentional, and 3% were related to law enforcement or undetermined. Among the injuries, 71% were assault, 21% were unintentional, 5% were related to law enforcement or undetermined, and about 3% were from self-harm.

As for unintentional firearm injuries, Weiser said, the third-grade girl he treated was not the only accidental gunshot wound he saw in a child. Another such injury involved a boy around 9 who was given a handgun for his birthday.

"He shot his 6-year-old brother, playing in the backyard," Weiser said, adding that the new study findings show that boys are much more likely to be injured by firearms than girls.

Boys accounted for 82% of all child firearm deaths and about 84% of all nonfatal firearm injuries that were medically treated in the study. African-American children had the highest rates of firearm homicide, and white and Native American children had the highest rates of firearm suicide.

Those patterns of gun-related deaths appeared to fluctuate by state.

Where children die by firearms

While the District of Columbia and Louisiana had the highest rates of child firearm deaths, several states -- including Delaware, Hawaii, Maine and New Hampshire -- had 20 or fewer deaths, the researchers found.

The highest rates for homicides were concentrated in the South; across the Midwestern states of Illinois, Missouri, Michigan and Ohio; and in California, Nevada, Connecticut, Maryland and Pennsylvania.

For suicides, which were calculated only for children 10 and older in the study, the researchers found that incidents were widely dispersed across the country. However, separate research has found rates of suicide by firearm to be disproportionately higher in rural compared with urban areas.

For Dr. David Wesson, a pediatric surgeon at Texas Children's Hospital who was not involved in the new study, the rates of suicide that emerged in the data were among the most disturbing trends.

"It's important for parents to be aware of their children's state of mind and if they're depressed," he said. "Just having access to a gun in a situation where you're upset with what's going on at school or with your friends, or your own internal emotional state, it unfortunately can lead to suicide. It's very important for parents to be aware of that, particularly if they have guns in the home."

Overall, the researchers found that older children, those 13 to 17, had a rate of fatal firearm injury that was more than 12 times higher than the rate for children 12 and younger.

"These are preventable injuries that have a major public health impact on early death and disability among children," said Katherine Fowler, a behavioral scientist for the CDC and lead author of the study.

Yet she added that some promising trends also appeared in the data.

"Although firearm homicides of children significantly increased between 2002 and 2007, they significantly declined between 2007 and 2014," Fowler said.

"This is a very encouraging trend. There are many evidence-based programs and policies that have been found to be effective in preventing youth violence, including youth homicide," she said. "Preventing such injuries and ensuring that all children have safe, stable, nurturing relationships and environments remains one of our most important priorities."

Fowler pointed to a collection of strategies that the CDC has developed to help states and communities build effective programs, policies and practices around violence prevention.

"Firearm-related injuries contribute substantially each year to premature death, illness and disability of children. These injuries are preventable," she said.

The researchers noted in the study that their findings are subject to limitations.

For instance, unintentional firearm deaths may be significantly underreported, which skews data, and firearm injuries that were not treated in a hospital or similar health care setting were not included.

All in all, the new findings seem to fall in line with previous research on gun violence among children in America.

'It really is a complex disease'

Based on the findings, the data suggest that about 19 children a day die from or are medically treated in an emergency room for a gunshot wound.

Previously, it was estimated that on average 16 children a day are hospitalized due to firearm injuries in the US, according to research presented at the Pediatric Academic Societies Meeting in San Francisco in May.

Of 23 high-income countries, 91% of children killed by firearms in 2010 were from the US, according to a study published in The American Journal of Medicine last year.

Dr. Stephen Hargarten, professor and chairman of emergency medicine at the Medical College of Wisconsin, likened gun violence in America to a disease.

"The fact that these children are injured, they are cared for by surgeons, within the health care system, they have fractures, they have brain injuries, they have lacerations to their body and so forth, so that's the biology of this disease," said Hargarten, who was not involved in the new study.

He added that the agent of the disease would be the kinetic energy from a bullet that is firing out of a gun.

"The psychosocial components are related to the circumstances of these events, of the domestic violence disputes that result in children getting injured or killed, the psychological issues surrounding the transitions of thinking or feeling suicidal and ending their life," Hargarten said.

"Then the social aspects of this are related to the environmental circumstances," he said. "And the social constructs of companies that make these products that are available to children, that can be used very easily by children, and so it really is a complex disease."

There are ways in which guns can be made not so easily accessible to children, Hargarten said.

Safety tips for parents with guns

A lock box or gun safe can be an effective way to keep a gun away from children, Hargarten said. Or stimulating the marketplace for smart guns designed to unlock only for an authorized user could be promising, he said.

JUST WATCHED Introducing the future of gun safety? Replay More Videos ... MUST WATCH Introducing the future of gun safety? 02:35

"That would have an impact in the home -- where, again, properly secure it -- but even if the child or young adult does find the gun, they can't use it because they're not authorized to access the gun," Hargarten said.

Being mindful of who is nearby when a gun is being handled in the home can also play a role in injury prevention, said Wesson, the pediatric surgeon in Texas.

In his 35-year career, the first infant with a gunshot wound whom Wesson ever treated was accidentally shot while sitting in a baby chair at the kitchen table. The infant was only about 4 weeks old, he said.

"The father was sitting there, on a kitchen chair, and was doing something with his rifle. He said he was cleaning it," Wesson said.

Suddenly, the rifle accidentally fired in the baby's direction.

"Fortunately, it was a low-power rifle. It just hit the baby in the abdomen and made a big opening in the abdomen," he said, adding that the baby survived.

"Everything was healed up in the end, but it was a devastating and tragic event, and of course you can imagine how the parents felt about it. They were devastated, and that's the typical story. You don't expect it to happen, or it was an accident," he said. "Health care centers and trauma centers and people participating in trauma care can offer a lot to injured people, but the rational approach is to prevent these injuries from occurring in the first place, whether it's unintentional or intentional."

Dr. Eliot Nelson, a pediatrician at the University of Vermont Medical Center, wrote an editorial that accompanied the new study in the journal Pediatrics.

Recommending to remove guns completely from a home can be off-putting for parents who might keep guns for hunting or protection, he said.

Rather, "we can point out that parents may underestimate kids' propensity to handle guns unsafely, even when they've been taught," Nelson wrote.

"Excellent information can be shared on safe storage and locking methods that still allow quick access to a handgun if it were ever needed," he wrote. "And finally, given the impulsivity, risk-taking, and unpredictability of adolescence, we should promote safe storage as a routine measure."

Join the conversation See the latest news and share your comments with CNN Health on Facebook and Twitter.

Weiser, the Stanford trauma surgeon, hopes there will be fewer gun-related injuries and deaths among children in the future. He compared gun violence to an earthquake.

"When you build a city in an earthquake zone, you make the buildings as earthquake-proof as possible. You try to build in as much possible safety as you can," Weiser said. "And so, why we can't make safer guns and make safer laws is beyond me."