Two York police cruisers were damaged last night when they were hit by a motorist who police say was driving under the influence and texting.

York police said that at 12:10 a.m. today, Officer Luke Ernenwein had stopped a vehicle for following too closely on Route 1 near Abbott Brothers Tree Service and was checking the female motorist’s sobriety outside her vehicle.

Officer Tyler Gagne then arrived at the scene to help and pulled behind Ernenwein’s cruiser. Both cruisers’ emergency lights were flashing.

Ernenwein then noticed a southbound 2003 Honda Accord drifting towards them, yelled a warning and pulled the female driver back.

The Accord crashed into the left rear side of Gagne’s cruiser and then into Ernenwein’s cruiser.

The operator of the Accord, Nicholas P. Bergeron, 24, of Windham, N.H., was treated at and released from York Hospital and arrested on charges of operating under the influence, texting while driving and improper passing of emergency vehicles.

Unable to post bail, Bergeron is being held at York County Jail.

Neither the officers nor the female driver, who was not charged with a violation, were hurt.

The police vehicles were inoperable and towed from the scene. Bergeron’s vehicle was heavily damaged.