An erratic driver swerved, crashed and spun out during a harrowing 10-mile odyssey last week on I-195 that was recorded on a dashcam by another driver who called police and helped avert a potential catastrophe.

When John Barrett saw the car all over the road, he said he knew he had to intervene until police could arrive.

"For me, it was more important to basically put my hazards on, drop behind him, to document. Not to try to pull him over," Barrett said in a phone call with NJ Advance Media on Tuesday. "My wife and kids wouldn't like that too much if I started playing fake cop."

Barrett's dashboard camera captured the blue car as it initially started veering out of its lane. Then things got crazy.

The car speeds ahead and is barely visible in the footage for a few minutes. Eventually, it crashes into a sign on the ride-hand shoulder, but crosses back and continues at a high rate of speed in the left lane.

"The only time I thought there was going to be an issue was when my car was hit my debris," from when the car hit the sign, said Barrett, who is the finance director for Hamilton Township in Mercer County. "I'm never going to put myself at risk. I was more concerned about the safety of others."

Several minutes into the more than 10-mile pursuit, the car goes completely off the roadway and into the grassy median, spinning around and coming to rest alongside opposing traffic. The driver then makes a U-turn, and pulls back into the eastbound lane, re-entering the roadway.

"He just went off the road," Barrett says in the video. "He's back on."

As the car continues into Ocean County, Barrett said he could see a police cruiser approaching, about a mile behind. Just then, the car crashes into a white SUV, running it off the road.

A trooper arrives almost immediately after, stopping the car around mile marker 23 in Jackson Township.

NBC New York reported that the driver, 29-year-old Joseph Scott, was taken into custody. He faces criminal charges for having heroin and a syringe in the vehicle, as well as multiple driving violations.

Barrett said he hopes the video will remind people ahead of the 4th of July holiday of the dangers of impaired driving.

"They should really think twice, and certainly get an Uber or something or just decide not to drive," he said.

Amanda Hoover can be reached at ahoover@njadvancemedia.com. Follow her on Twitter @amandahoovernj. Find NJ.com on Facebook.

Have a tip? Tell us. nj.com/tips