Cops smashed an unruly driver’s window and yanked him from his car after he rammed into a police cruiser in Midtown, police said Thursday.

The irate driver was stopped for not wearing his seatbelt at about 6:40 p.m. Wednesday on West 48th Street, between 5th and 6th avenues — but when cops asked for his ID, the 57-year-old rolled up his windows and cranked up his radio, police said.

After cops called for ESU backup, the driver, Arosmar Vazquez, floored it, ramming his Lexus into the police car parked in front of him, according to police.

One of the officers smashed the driver’s window and cops pulled Vazquez out of the car, according to NYPD.

Vazquez was taken to Bellevue Hospital for a psych evaluation.

Cops later charged the Vazquez with resisting arrest, obstruction, criminal mischief and disorderly conduct — and ticketed him for not wearing a seat belt.

Three officers got minor injuries in the encounter.