BYRON, N.Y. (AP) — A man who acknowledged shooting the windows out of a western New York deputy's patrol car during a traffic stop is headed to prison.

The Genesee County District Attorney's office says 55-year-old David O'Connor pleaded guilty to attempted second-degree murder and was sentenced Tuesday to 12 ½ years behind bars.

Authorities say O'Connor used a .22-caliber rifle to fire at the deputy's patrol car in March at an intersection in Byron. The deputy was sitting in his cruiser when both of his rear side windows shattered.

O'Connor was found alone in a room in a nearby hotel with the rifle.

[STORY BY: THE ASSOCIATED PRESS]

More From WIBX 950