PLAINFIELD, Ill. -- Most roads have reopened in Plainfield after a train carrying crude oil derailed nearly 40 miles southwest of Chicago.

Plainfield police said it will take several days to clean up an estimated 45,000 gallons of oil near Route 59 and Riverwalk Court, near the village's downtown business district.

Twenty train cars belonging to Canadian National Railway derailed before 7 p.m. Friday. Oil leaked from at least two cars and possibly a third, with much of it flowing into trenches that were dug for a natural gas pipeline.

The scene after a train derailment in Plainfield, Illinois. CBS Chicago

There were no injuries. Police said Plainfield residents are not in any immediate danger.

Get Breaking News Delivered to Your Inbox

Emergency crews have been able to cordon off the spilled material and keep it from reaching the nearby DuPage River, Plainfield Police Sgt. Mike Fisher said, CBS Chicago reports.

The cause of the derailment was being investigated Saturday.