Media playback is unsupported on your device Media caption TV cameras and onlookers filmed some of the explosions

Residents of a North Dakota town have evacuated after a mile-long train carrying crude oil burst into flames after derailing nearby on Monday.

Most of Casselton's residents left their homes as winds blew potentially hazardous smoke toward the town overnight, Mayor Ed McConnell said.

No injuries were reported in the crash.

Estimates of the fire varied, with the rail firm saying they believed about 20 cars had caught fire while the local sheriff said 10 cars were ablaze.

On Tuesday, investigators still could not get close to the burning train and officials said the cars would be allowed to burn out.

Earlier, a spokeswoman for the North Dakota Department of Emergency Services said the last 50 wagons of the train had been uncoupled, but another 56 remained at risk.

'Not if, when'

The derailment, after a collision involving another goods train, is reported to have happened near an ethanol plant.

Cass County sheriff's office said it was "strongly recommending" that residents in parts of Casselton and anyone living five miles (8km) to the south and east evacuate.

Mr McConnell said most residents had heeded that warning.

"I drove in this morning and looked like most people had left," he told the Associated Press news agency. "There weren't a lot of lights on."

Officials have said a change in weather patterns could expose residents to smoke and possible health hazards.

Residents within 10 miles of the scene are being asked to stay indoors.

A shelter for those evacuated has been set up in Fargo, about 25 miles away.

Mr McConnell said it was time to "have a conversation" about the dangers of transporting oil by rail.

"There have been numerous derailments in this area," he said. "It's almost gotten to the point that it looks like not if we're going to have an accident, it's when."

The number of crude oil carloads transported by US rail lines jumped from almost 11,000 in 2009 to a projected 400,000 in 2013.

Despite the surge, the rate of accidents has stayed relatively steady.

But some have been deadly. In July a train carrying oil from the Bakken oil region in North Dakota derailed near the Canadian town of Lac Megantic, killing more than 40 people.

Image caption Officials say several wagons of the train had been knocked off the tracks

Image caption Residents said the heat from the explosion could be felt from the town of Casselton

Image caption The accident happened at around 14:00 local time on Monday afternoon