A 15-year-old armed robber picked the wrong ‘victim’ when he and two 14-year-old accomplices attempted to rob an off-duty U.S. Customs and Border Protection Friday night.

The incident happened shortly before 8:15 p.m. in the area of First Avenue and Colorado Boulevard in Arcadia, California.

The customs agent was walking on a sidewalk when he was attacked from behind by three suspects – two 14-year-olds and an armed 15-year-old identified as Pasadena resident Darius Smith, authorities said.

One of the assailants allegedly repeatedly struck the agent in the head as another pointed a gun at him and demanded his property.

“The victim thought the subjects were going to rob and shoot him so he retrieved his department-issued handgun,” Los Angeles County Sheriff’s Deputy Caroline Rodriguez said. “The victim shot at the subjects in an effort to defend himself.”

Two of the suspects were hit with gunfire, the third suspect fled the scene. The 15-year-old suspect was transported to a local hospital where he was pronounced dead. The two 14-year-old suspects were apprehended; one was hospitalized with non-life threatening gunshot wounds, the other, who fled the scene of the crime on foot, was booked at Central Juvenile Hall in Boyle Heights on suspicion of robbery.

Arcadia police officers confirmed the handgun Smith allegedly used in the crime was recovered at the scene.

The agent suffered bruising to his face but did not require medical attention.