A Windham man was arrested late Thursday night after he led police on a chase through four towns and later admitted to shooting heroin, according to the York County Sheriff’s Office.

Deputies were called to the Village Variety Store in Parsonsfield about 10:30 p.m. Thursday after residents reported a man passed out in a car parked on the side of the building.

Deputy Bob Carr said a man was slumped over in the driver’s seat of the car, but when Carr reached in to remove the keys, the man, identified as Clifford Perkins, 31, woke up, started the car and drove off. Carr managed to get his arm out of the vehicle but suffered minor injuries.

Perkins led sheriff’s deputies and Maine State Police troopers through Parsonsfield, Porter, Hiram and Cornish before the chase ended when Perkins crashed into a stone wall in Parsonsfield, the sheriff’s office said. He then ran into a field and deputies fired a Taser stun gun to subdue him, the deputies said. According to the sheriff’s office, deputies found a hypodermic needle in Perkins’ pants pocket and he admitted to shooting heroin earlier in the evening. Deputies also said they found an empty wrapper on the front seat of Perkins’ car that appeared to contain heroin residue.

Perkins had two outstanding warrants, the sheriff’s office said, for unpaid restitution in Knox and Cumberland counties. He was also charged with eluding an officer, reckless conduct with a dangerous weapon and assault on an officer. He is being held at the York County Jail, and bail was set at $50,000 cash.