They stuck to the right path — too bad it wasn’t intended for cars.

A family from Burlington, Mass., was trapped in a ditch for seven hours early Sunday after faithfully following their GPS directions right onto a snowmobile trail.

Dattu Prajapati, 45, a second adult and five children were en route to Gorham, NH, from the Bretton Woods ski area late Saturday when they wound up stranded, the Boston Globe reports.

Prajapati entered the treacherous trail — which officials say is clearly marked by signs indicating it is for snowmobiles only — and soon found he couldn’t get off it. After white-knuckling it for several miles along the icy route, he finally found an opportunity to turn around, only to slide off the path and become trapped in a ditch beyond the reach of cellphone service.

An emergency service feature in Prajapati’s minivan enabled him to contact a towing company, but it took the company hours to reach the trapped minivan’s remote location.

“Once the vehicle was located, it was immediately apparent that it would take specialized off-road equipment to make a recovery,” reads a statement on the New Hampshire Fish and Game Law Enforcement Division’s Facebook page. “In all, the family was stranded for nearly seven hours from start to finish and required extra fuel to ensure that their vehicle made it out of the woods.”

An ATV and two tow company employees were needed to free the family, who were finally back on a road intended for automobiles around 2 a.m., the statement continues. To add insult to injury, Prajapati was “cited for operating a conventional vehicle on a snowmobile trail,” despite the problem being a frequent occurrence on the path.

“Situations similar to this one have played out at this location many times before, leaving authorities and local snowmobile clubs constantly trying to alert motorists to the seasonal changes in vehicle use,” the statement concludes.

Facebook commenters were quick to place blame on the driver.

“GPS isn’t always what it’s cracked up to be. You have to use common sense and use your head to think,” posted Nancy Woodman West of Concord, NH. “Anyone who lives in New England should know not to take back roads in winter unless they know the road. I’m glad they are all ok and safe, but driving on a snowmobile trail? Didn’t they think something was wrong from the beginning? Really?”

Other standout strandings in 2019 included a Texas family who required a multi-agency search mission after getting stuck in the Rocky Mountains — and a Queens kitesurfer rescued by NYPD divers.