(BLOOMINGTON) - A 17-year-old boy is facing attempted murder charges after he pulled a gun on a Monroe County Sheriff's deputy and pulled the trigger.

Monroe County Sheriff Brad Swain says that the magazine of bullets had fallen out of the gun during the foot chase so the gun did not fire.

Monday night's incident started during a traffic stop of a moped just before 9 p.m. on South Walnut Street and Winslow Road. The officer stopped the vehicle because the driver didn't have his lights turned on.

Deputy Landon Reynolds noticed the moped had been hot-wired and that he told the juvenile driver and passenger that they would be detained while he investigated the possibility the moped had been stolen.

The teenage driver then fled on foot through woods and along the B-Line Trail. Several sheriff's deputies and Bloomington Police Department officers searched for the teen.

Deputy Jeff Brown found the teen leaning against a tree and ordered him to stop. He ran again, and was seen running into an area of tall weeds near the old CSX rail corridor.

Brown saw a silver handgun in the teen's hand, and he alerted the other officers involved in the pursuit, Sheriff Swain says.

Officers formed a skirmish line and found the teen lying in the tall weeds. He did not respond to commands and was dragged out and handcuffed.

The teen was wearing body armor and had ammunition in his pockets. He told police he threw the handgun in the woods during the chase. Officers recovered the weapon a short time later.

The teen told police that during the chase he aimed the gun at the chest of the deputy who found him in the woods (Deputy Brown) and pulled the trigger, but the gun did not go off. The teen told police the magazine had fallen out of the gun during the chase and says that is why it didn't fire.

The teenager, who was possibly on drugs, was transported to IU Health Bloomington Hospital for a blood draw and then transported to a juvenile detention Center.

The Monroe County Prosecutor's office officials reported they are waiting on a probable cause affidavit to be filed before deciding on if the teen will be charged as an adult.