A 41-year-old man was taken into custody for alleged drunk driving after fleeing from law enforcement in Santa Cruz County with a 3-year-old in his car.

The man’s Acura sedan first fled when Capitola police attempted to stop him for a traffic violation Friday night, the California Highway Patrol said. Capitola police discontinued the pursuit as a safety precaution.

CHP units later located the Acura near the Seascape area and attempted to stop the vehicle, which again fled, the Highway Patrol said Saturday on social media.

The vehicle finally came to a stop at a nearby beach as it headed toward the ocean, according to the CHP.

The driver, from Las Vegas, was accused of felony evading, DUI and child endangerment, the CHP said.

The child’s 38-year-old mother, also from Las Vegas, was taken into custody on separate charges, the CHP said, without giving details.