North Dakota train crash
A train carrying crude oil derailed after a collision and burst into flames in North Dakota Reuters

The population of an entire town in North Dakota has been ordered to evacuate after a train carrying crude oil derailed in a collision and burst into flames.

The train, which was a mile (1.6km) long, went off the tracks in a snow-covered field near the northern town of Casselton 20 miles west of Fargo after it crashed into another train carrying grain.

No one was injured in the crash but at least 10 of the 106 wagons, which contained oil, caught fire and exploded. A huge cloud of black smoke billowed into the sky.

Police initially urged people living within a 10-mile radius of the incident to stay indoors but weather forecasters said that shifting winds could cause the hazardous smoke to cover the town of 2,400 inhabitants, prompting the authorities to order the evacuation.

"That's going to put the plume right over the top of Casselton," Cass county sheriff Paul Laney said. "This is nothing to play with."

An investigation has been launched into the accident.

"I looked out the window and all of a sudden the train car tipped over and the whole thing was engulfed in flames and exploded. The oil car tipped over on to the grain car," said Hannah Linnard, 13, who witnessed the crash from a friend's house half a mile away.

Sheriff's sergeant Tara Morris said it could take hours for authorities just to be able to get close to the fire. "[It's] a blessing it didn't happen within the city," Morris said.

It was not clear how many wagons went up in flames. BNSF Railway Company said it believed that about 20 cars caught fire, while the sheriff's office put the number at 10.

North Dakota emergency services said that the last 50 wagons of the train had been uncoupled by the crash.

North Dakota is the second largest oil-producing state in the US after Texas.