 -- As Los Angeles County sheriff's deputies were shooting at a pit bull that was charging at them, a 17-year-old boy was apparently struck in the chest by one of the bullets and died, the sheriff's office said.

The shooting happened at about 3:45 a.m. today in Palmdale, California, after deputies responded to a report of loud music, the Los Angeles County Sheriff's Office said in a statement. As the deputies walked up the driveway, a 60- to 65-pound pit bull "aggressively charged at the deputies and attacked one of them," biting the deputy on the knee, the sheriff's department said.

At that time, a young man came out from behind an apartment complex and restrained the dog and took it to the back of the building, the sheriff's office said.

Deputies were helping the injured officer and waiting for paramedics when "the pit bull came from the rear of the apartment and again charged at deputy personnel," the sheriff's office reported. "At that point, two deputies shot at the pit bull from a 5- to 7-feet distance, at which time, the pit bull retreated back to the rear of the apartment complex into the carport area."

The deputies went to the back of the complex "in an attempt to corral the dog to prevent additional victims," the sheriff's office said, and as they walked to the rear carport area, they found a teenager on the ground who appeared to have been shot in the chest, the sheriff's office said. The teen was hospitalized and later died.

The sheriff's office said "detectives believe when the juvenile came out from behind the building, which was approximately 40 feet away from where the shooting occurred with the dog, the juvenile may have been struck by one of the skip rounds." Capt. Christopher Bergner of the sheriff’s office said it appeared that the "skip round" that hit the teenager had ricocheted off the ground, the Los Angeles Times reported.

The deputy bitten by the pit bull was also hit in the leg by a bullet fragment, the sheriff's office said. According to the Los Angeles Times, Bergner said in a press conference the deputy's injury also appeared to have been from a skip round that had ricocheted off the ground. He was transported to a hospital and is listed in stable condition, the sheriff's office said.

The sheriff's department said the investigation is ongoing. Because this was a fatal deputy-involved shooting, separate investigations will be conducted by the Los Angeles County Department of Medical Examiner - Coroner, Sheriff's Homicide Bureau and Internal Affairs Bureau, the sheriff's office said. The Office of the Inspector General is expected to provide independent oversight during the investigation and the Los Angeles County District Attorney is also involved. "Once concluded, every aspect of the shooting is reviewed by the Sheriff's Executive Force Review Committee," the sheriff's office added.

The pit bull will be euthanized, the sheriff's office said.

Nicole Nishida, a spokeswoman for the sheriff's department, said the department's policy for using a firearm on an animal is, "Personnel may use firearms to employ deadly force when dealing with animals when they reasonably believe that death or serious physical injury is about to be inflicted upon themselves or others.

"The shooting of animals that are not a threat of serious bodily injury to a person has proved to be inherently dangerous to bystanders as well as Deputy personnel. Therefore, Department members shall not use firearms to shoot animals fighting with other animals (e.g., dogs)," Nishida said. "If it becomes necessary to destroy an injured (euthanasia) by use of a firearm and the conditions are such that there is an extended or inappropriate response time by the animal control agency, authorization to use a firearm on an animal must be obtained from an on-scene supervisor."