Maine State Police shut down part of Interstate 95 southbound near Waterville on Friday to protect the public while troopers tried to stop a man who was driving erratically.

Police said a black Toyota pickup truck was traveling about 25 mph in the passing lane at mile 122 in Sidney.

The driver, Kyle Long, 29 of Waterville, at one point stopped the car in the middle of the road but refused to get out, police said. Police said he appeared impaired or to be having a mental health issue.

Police could not remove the keys from the ignition because there was an aggressive dog in the car, police said.

Police followed Long for 4 miles down the highway until Maj. Brian Scott used his cruiser to ram the back of a car, causing the driver to lose control. The car crashed in the median.

Long was charged with failure to stop for an officer, passing a roadblock, refusing to submit to arrest and violating bail conditions from a prior arrest.

He was taken to the Kennebec County Jail in Augusta, where he was being held without bail pending a medical evaluation.

An animal control officer took custody of the dog, which was not injured.