The Bremerton Schools superintendent’s office said the girl was shot in the abdomen.

KING-TV reported that her friends and relatives gave a ‘thumbs up’ signal to reporters as they left the hospital late Wednesday.

The boy who brought the gun to Armin Jahr Elementary in Bremerton was booked into Kitsap County juvenile detention for investigation of unlawful possession of a gun, bringing a dangerous weapon to school and third-degree assault.

The gun was recovered from a classroom. Police did not immediately describe it.

There have been shootings at schools that involved younger children. In 2000, 6-year-old Kayla Rolland, a Michigan first-grader, was fatally shot by a 6-year-old classmate who brought a gun from home. Last year, a 6-year-old kindergartner at a Houston elementary school accidentally fired a gun as he was showing it off to friends, injuring three students.

Bremerton Schools spokeswoman Patty Glaser said the school where Wednesday’s shooting happened, with about 400 students, planned to be open for classes on Thursday. She said three counselors would be available to talk with teachers, students and parents.

The school is in a quiet residential neighborhood about 20 miles west of Seattle, across Puget Sound.

Fisher said officers and emergency crews were dispatched to the school around 1:30 p.m. Wednesday in response to a call that a student was shot by another student.

The school went into lockdown immediately after the shooting, Glaser said. Parents picked up their children later in the afternoon.

In the latest rating by the Brady Campaign, a national gun control advocacy group, Washington scored no points in the child safety category because the state does not require trigger locks for guns and lacks laws to prevent child access to firearms.

“Washington state is a loosely regulated state when it comes to firearms,” said Gregory Roberts, executive director of Washington Cease Fire, a Brady Campaign affiliate.

Amanda Roth, a staff attorney for the San Francisco-based Legal Community Against Violence, said 27 states and the District of Columbia have some form of firearm child access prevention laws. Such laws can include requirements to use gun locks and criminal penalties for adults who allow children to get their hands on guns.