An attempted traffic stop turned into a police pursuit, ending with the arrest of a Lindenhurst man after he ditched a rented U-Haul van in a wooded area late Tuesday afternoon in Brentwood then tried to flee on foot, Suffolk County police said.

Keith Doherty, 45, of North Clinton Avenue, was charged with fleeing a police officer in a motor vehicle, two counts of reckless endangerment, two counts of aggravated unlicensed operation of a motor vehicle and third-degree criminal trespass.

advertisement | advertise on newsday

Arraignment information was not immediately available.

Police said officers attempted a traffic stop on the rented 2016 Ford Transit U-Haul van with Arizona plates after they recognized Doherty from prior aggravated unlicensed operation incidents — one on Aug. 1, the other on Sept. 15.

What was termed as “a short pursuit” began on Wheeler Road near Motor Parkway in Central Islip and ended on Gates Street.

Doherty was apprehended just before 5 p.m.