Thousands of New Jersey drivers had the perfect way to shave time off their nightmare commute into the city — until the town they were using for the shortcut applied the brakes.

 

Tree-lined Leonia, in Bergen County, took the drastic step Monday of banning out-of-town motorists from its side streets during rush hour. Locals hail the move as necessary to curb the up to 12,000 additional cars a day that flooded its streets, but nonresident drivers are up in arms — and legal experts tell The Post the law will undoubtedly end up in a court battle.

“Leonia is illegally trying to expand their municipal jurisdiction, and they are attempting to legislate on matters that are normally within the purview of the state of New Jersey,” insisted Theodore Sliwinski, a lawyer in East Brunswick, NJ. “These new laws will definitely be challenged.’’

Leonia officials say they were forced to enact the extraordinary law — which includes $200 fines for scofflaws — because navigation apps like Waze encouraged drivers to use the town’s side streets as a shortcut to the George Washington Bridge.

Locals complained that the traffic has been unbearable — with some unable to back out of their driveways — and downright dangerous.

Under the new law, about 60 Leonia streets will be closed to nonlocals daily from 6 a.m. to 10 a.m. and from 4 p.m. to 9 p.m., unless they can prove they have actual business in the area.

Residents and employees working in Leonia must display town-issued yellow hang tags in their vehicles to access the side streets.

Three major thoroughfares in the town — Fort Lee Road, Broad Avenue and Grand Avenue — are exempt from the restrictions.

Although the regulation is now officially in effect, the town is providing a two-week “grace period” to nonresident commuters before slapping them with the hefty fine if they venture onto the side streets during the newly forbidden hours.

Read more from The New York Post