A city cop started his day with a little target practice at the NYPD firing range — and ended it by getting blind drunk at a bar, pulling out his gun and blasting a random stranger who had pulled up next to him in a car, police sources said Wednesday.

NYPD Officer Brendan Cronin drove up to a stoplight just past the city border in Pelham, Westchester, a bit before midnight Tuesday and allegedly unloaded his boozy barrage at a passenger in another car.

He fired 13 shots, hitting the man six times, the sources said.

Cronin, 27, capped his night of misadventure by nearly getting himself killed — allegedly pointing his Glock 9mm at officers who stopped him after he fled the scene of the shooting.

Authorities said the trouble all began when Cronin downed numerous drinks with some other cops at the end of a day that included a visit to the NYPD firing range in The Bronx.

Investigators had no idea why the six-year veteran of the 46th Precinct allegedly opened fire on Joe “The Truck” Felice, 47, who had been heading home with a pal after playing in a recreational hockey game.

Cronin was so drunk, he did not even remember firing his weapon, the sources said. “We have not been able to find any link between the two persons,” said Pelham Police Chief Joseph Benefico. “We have nothing to link either party to each other — no road rage, nothing.”

Benefico said Cronin waved his gun out of his car’s window and began firing while stopped at a light at the intersection of Lincoln and Sixth avenues.

After the shooting, Cronin — who had apparently been heading to his Yonkers home — allegedly sped away. Someone who called 911 said the shooter’s car’s hazard lights were flashing.

This made it easy for Pelham officers to track the drunk cop, and they stopped Cronin a half-mile away in New Rochelle. After nearly getting himself shot in the ensuing standoff, when he allegedly pointed his gun out the window, he eventually gave up, tossing out his car keys. He was arrested and charged with assault.

Felice told police he heard the gunshots while sitting at a traffic light in the passenger seat, a source said. After realizing he had been shot, Felice slumped down and was struck five more times.

After the fusillade of gunfire, Felice looked up and noticed a bullet hole in the headrest he had been using moments before, the source said.

The victim was rushed to Montefiore Medical Center in The Bronx, where he was in stable condition Wednesday. He suffered wounds to his lungs, arms and torso, sources said. One shot barely missed his head.

The Westchester shooting wasn’t the only incident of an NYPD officer getting drunk and firing at a car.

Sgt. Wanda Anthony fired at a woman’s car during a domestic dispute in Wat­chung, NJ, around 3:30 a.m. Wednesday, sources said. There were no injuries. Anthony has been suspended without pay and charged with DWI.

Tuesday night’s Pelham shooting also comes on the heels of an incident in which an on-duty and drunken officer allegedly shot his partner by accident after they had drinks at a Howard Beach diner.

“We’re very concerned with a number of reports,” Police Commissioner Bill Bratton said. “I, personally, am very disturbed about the number of incidents in recent weeks that are part of a longer-term problem of inappropriate use of alcohol by members of our department.”

Additional reporting by Kirstan Conley and Daniel Prendergast