The Los Angeles Police Department said Wednesday that an officer shot and wounded a 15-year-old boy after spotting him in an alley next to someone who appeared to be aiming a handgun. The weapon turned out to be a replica firearm. The boy was transported to a local hospital and released after treatment.

"It’s certainly an unfortunate situation," police department spokesman Cmdr. Andrew Smith told the Los Angeles Times. "But because of people bringing replica weapons out like that, it certainly could have been a terrible tragedy."

Around 7:45 a.m. Tuesday, two officers were driving in the 7200 block of 10th Avenue when they spotted a group in an alley. A teenager was pointing what police thought was a gun at another person, Smith said.

Officers ordered the boy to drop the weapon multiple times, Smith said. When he didn’t comply, one of the officers opened fire.

The teen holding the replica weapon was unharmed, but the 15-year-old boy standing next to him was struck, Smith said.