A van sped off when police tried to stop it for driving with its headlights turned off and then — with police following — the driver flipped the vehicle after striking a utility pole in Farmingville, Suffolk County police said Wednesday.

Police said the driver was drunk when he fled a traffic stop in Shirley, on the William Floyd Parkway near Victory Avenue, at 12:21 a.m. before crashing at Horseblock Road and Liber Boulevard at 12:31 a.m. — about 14 miles away.

advertisement | advertise on newsday

Emergency services officers and rescue personnel from the Farmingville Fire Department used hydraulic cutting tools to free the driver who was pinned in the vehicle, the spokeswoman said.

He was taken to Stony Brook University Hospital, and charges, including driving while intoxicated and criminal impersonation, are pending; police said he will be charged with driving while intoxicated.

His injuries were deemed “not serious,” the spokeswoman said.

With William Murphy