SECAUCUS, NJ (CBSNewYork) — Several homes had to be evacuated early Tuesday morning after a diesel tanker truck overturned, spilling fuel in Secaucus.

The crash happened around midnight on Route 3. The driver of the truck said he was cut off and forced to swerve into the woods. That’s when the truck overturned and starting spilling hundreds of gallons of diesel fuel onto the road.

READ MORE: Driver Being Questioned After 15-Year-Old Girl Struck, Killed By School Bus In Brooklyn Hit-And-Run

Hazmat crews were called to scene and worked furiously to keep the fuel contained and from spilling into a nearby stream. Police evacuated eight homes as a precaution, worried that the fuel may catch fire. They were allowed back in their homes a few hours later.

Only about 500 of the 3,000 gallons of the diesel fuel inside the tanker made its way on the highway.

READ MORE: Experts Say 'Blue Monday' Is A Good Reminder To Reach Out To Those Who May Be In Need Of Emotional Support

“We were able to contain it quickly and plug a leak on the tanker,” said Deputy Fire Chief George Schoenrock with the Secaucus Fire Department.

The overturned tanker was lifted back on its wheels and towed away.  The driver was not seriously hurt.

MORE NEWS: Sources: Texas Synagogue Hostage Taker Flew Into JFK Airport, Stayed In NYC Before Incident