PALMDALE (CBSLA.com) – Deputies accidentally killed a 17-year-old boy while shooting at an aggressive dog outside a home in Palmdale early Thursday morning, the Los Angeles County Sheriff’s Department said.

The boy, who was identified by family as Armando Garcia, was likely struck by a ricocheted bullet, LASD reports.

The shooting occurred at approximately 3:47 a.m. in the 38500 block of 10th Street East, according to the sheriff’s department. Deputies were checking on a house party when they were reportedly confronted by a pit bull.

At some point, Garcia came outside to check on the dog, which had bitten a deputy on the leg, LASD said. Deputies opened fire on the dog, and one of the bullets may have ricocheted off the pavement and struck the boy.

“It appears that as we are investigating this and looking at the evidence, that within that first six to eight feet, of where the shooting occurred with the dog, there are skip rounds in the apron of the driveway,” LASD Capt. Chris Bergner said at a Thursday morning news conference. “We believe that when the individual came out from behind the building, which was approximately 40 feet away from where the shooting occurred, he may have been struck by one of the skip rounds. And it is what we’re calling an extremely, extremely unfortunate incident.”

Garcia was taken to a hospital with gunshot wounds, where he was pronounced dead.

Family says Armando Garcia was just "protecting a dog" when he was accidentally killed by deputies' ricocheting bullets #Palmdale @CBSLA pic.twitter.com/lBapBJBiZ2 — JASMINE VIEL (@jasmineviel) June 22, 2017

“My nephew was trying to save the dog because the cops started shooting at the dog,” the victim’s aunt Amber Alcantar told CBS2.

Nick Perez, a friend of the victim, told CBS2 they had been in the house drinking. Perez said he passed out in his car and awoke to find deputies surrounding his vehicle.

“And then I see my homie bleeding,” Perez said.

The deputy that was bitten by the dog was also struck by a ricocheting bullet. That deputy was taken to a hospital for treatment, Bergner said.

The dog was shot three or four times, L.A. County animal control confirmed. It was taken to a veterinary hospital to undergo surgery, but had to be euthanized. It was not immediately clear who owned the dog.