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.

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.

“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.