An investigation is underway in the Town of Byron after a gunshot was fired into the a police cruiser during a traffic stop on Monday.

Deputy Andrew Hale was writing a ticket for someone not wearing a seat belt, when he heard something pop and then the windows of the police cruiser shattered. The Sheriff's Office says that it was gunfire from a .22 caliber rifle that pierced the car.

Another deputy was observing the traffic stop, and immediately jumped into action and shielded Officer Hale with his vehicle while the officers tried to figure out exactly what was going on.

Deputy Hale said that he originally suspected that the gun shot came from the vehicle that he pulled over but quickly realized that he was wrong when the driver stepped out of his car with hands up to check on if Hale was ok.

Deputy Joseph Corona, who was assisting Deputy Hale, said that he saw a man standing in a second story window across the street at the Byron Hotel.

When backup arrived, four members from the Genesee County Sheriff's Office went to up to the specified hotel room, and found a slightly intoxicated man with a rifle and a box of ammunition.

Officers arrested David Michael O'Connor and took him into custody. He has been charged with attempted aggravated murder of a police officer, felony first-degree reckless endangerment and felony third-degree criminal mischief.

David Michael O'Connor is being held at the Genesee County Jail without bail, and is due back in court on March 14, 2016.

More From The New 96.1 WTSS