The group took off running, and officers split up to follow them, said Lt. Joe Cirilo of the Rialto Police Department. One officer was able to catch up with one of the teens.
As the officer was patting down the suspect, a gun fell out, went off and a bullet hit the officer in the leg.
He was airlifted to a local hospital in Colton where he is expected to survive.
The teen was arrested for being a minor in possession of a loaded firearm.