MEAD, Wash. -- A suspect was taken into custody around 2:15 a.m. Wednesday morning after reportedly shooting at Spokane County Sheriff's Office deputies and fleeing the scene.

SCSO said they were attempting a traffic stop when the suspect attempted to flee.

The suspect was later identified as 45-year-old Mark Perry.

During the chase the deputy in pursuit heard two gunshots and observed debris flying from the rear window of the Lexus, according to the SCSO.

Perry crashed his car near Meadow Ridge Elementary at the intersection of Day Mountain Spokane Road and Freya during the pursuit. Perry exited the vehicle and ran into a wooded area after the crash.

Deputies searched the car and found a loaded nine millimeter semi-automatic pistol, a wallet with Perry's ID in it and a bag with methamphetamine in it, said the SCSO.

K-9 units were called to the scene to assist in the search for Perry.

The suspect was taken into custody shortly after surrendering to police without incident.

Following the arrest, deputies used a K-9 to track gun powder to see if the suspect dropped any firearms since the incident took place near a school.

The K-9 team found a loaded .357 revolver, that Perry had thrown away when he knew he would be caught, said the SCSO.

Perry was transported and booked into the Spokane County Jail for second degree attempted murder, atempting to elude a law enforcement vehicle, two counts of first degree unlawful possession of a firearm and possession of a controlled substance.

Editor's Note: An earlier version of this story stated Spokane Police were the law enforcement agency involved in this incident. It is instead the Spokane County Sheriff's Office.