An NYPD officer who opened fire last year on a car in Pelham after a night of heavy drinking faces 9 years in prison after pleading guilty Tuesday to attempted murder as part of a plea deal in Westchester County.

Officer Brendan Cronin, 28, of Yonkers, had spent April 29, 2014, at the NYPD's in-service training center at Rodman's Neck in the Bronx, and then allegedly went drinking afterward before heading home from City Island.

He opened fire on a car occupied by driver Robert Borrelli and Joseph Felice, both of New Rochelle, who were stopped at a light on their way home from a hockey game, and allegedly fired more than a dozen times, hitting Felice six times.

Felice was shot six times by Cronin's 9-mm service pistol, suffering wounds to the back, shoulder, arm and chest that required multiple surgeries. Cronin was arrested a few blocks away in an intoxicated state by Pelham police, according to the office of Westchester District Attorney Janet DiFiore.

Cronin pleaded guilty to two counts of attempted murder, two counts of first degree assault and one count of driving while intoxicated. He remained free on $150,00 bail on Tuesday, but was ordered to surrender on Sept. 29. He will be sentenced on Dec. 2.

The incident also triggered a civil suit by Borrelli and Felice that seeks to hold the NYPD liable for failing to rein in alcoholism in the ranks. It is pending.