A 6-year-old girl was shot in the ankle during what police believe was an accidental shooting Tuesday night.

The child was sleeping in her room when a gun was fired in an upstairs apartment through the floor, passing through the ceiling of the child's apartment shortly after 10 p.m. The girl was struck in one of her ankles, said West Valley Police Lt. Lynn Hanson.When the girl screamed, her parents ran into the room. After realizing what had happened, the parents called 911, Hanson said.

Police responded to the apartment, 2538 S. Lake Crest Drive (1810 West), and located a 23-year-old man and a 16-year-old boy who were taken into custody for questioning, Hanson said. Police were also talking with the suspects' mother, who apparently had been in the upstairs apartment during the shooting.

After the shooting, two other juveniles apparently left the upstairs apartment and began to run when they saw police arrive. Officers caught up with them and also took them into custody.

A gun was found in some bushes near the apartment building by a police dog.

"We're assuming that (the shooting) was accidental - that they were playing around with the gun and that it went off and went through the ceiling," Hanson said. "There is no way that they could have known where that little girl was at."

West Valley Police Lt. Charles Illsley said the suspects, known gang members, admitted playing with a .380-caliber semi-automatic handgun when the shooting occurred. Investigators believe the 23-year-old suspect fired the shot.

He was booked into the Salt lake County Jail on a $5,000 theft warrant, and now faces other charges in Tuesday night's shooting.

The 6-year-old girl was listed in good condition at Pioneer Valley Hospital Wednesday morning.