Emergency responders lifted mandatory evacuation orders on Tuesday afternoon in the U.S. town of Casselton, N.D., where a train carrying oil derailed on Monday setting off a series of blasts and a fire that is still raging.

"The environment within the city limits of Casselton is now safe for residents to return to their homes," the emergency responders said in a statement. The southeastern North Dakota town narrowly escaped tragedy in the blast, and the mayor is calling for changes in how the fuel is transported across the U.S.

One or two of the train cars carrying oil was still burning, said Casselton Mayor Ed McConnell.

No one was hurt in Monday's derailment of the 1.6 kilometre-long train that sent a great fireball and plumes of black smoke skyward about a mile from the town. The fire had been so intense as darkness fell that investigators couldn't get close enough to count the number of burning cars.

Most residents heeded a recommendation to evacuate their homes as strong winds blew potentially hazardous, acrid smoke toward the town overnight, Mayor Ed McConnell said early Tuesday. 

The North Dakota Department of Health warned that exposure to burning crude could cause shortness of breath, coughing and itching and watery eyes. It had said those in the vicinity with respiratory conditions such as asthma, bronchitis or emphysema should minimize outdoor activity.

Residents are now safe to return to their homes, responders said.

Cassleton 'dodged a bullet'

McConnell estimated that dozens of people could have been killed if the derailments had happened within city limits. He said it is time to "have a conversation" with federal lawmakers about the dangers of transporting oil by rail.

"There have been numerous derailments in this area," he told The Associated Press. "It's almost gotten to the point that it looks like not if we're going to have an accident, it's when. We dodged a bullet by having it out of town, but this is too close for comfort."

Residents said the blasts endured for hours after the derailment, shaking their homes and businesses. Official estimates of the extent of the blaze varied. BNSF Railway Co. said it believed about 20 cars caught fire after its oil train left the tracks about 2:10 p.m. local time Monday. The sheriff's office said Monday it thought 10 cars were on fire. Officials said the cars would be allowed to burn out.

casselton north dakota

(Google Maps)

A train carrying crude from North Dakota's Bakken oil patch crashed in Québec last summer and 47 people died in the ensuing fire.

North Dakota is the No. 2 oil-producing state in the U.S., trailing only Texas, and a growing amount of that is being shipped by rail. The state's top oil regulator said earlier this month that he expected as much as 90 per cent of North Dakota's oil would be carried by train in 2014, up from the current 60 per cent.

Authorities haven't yet been able to untangle exactly what caused the derailment. BNSF spokeswoman Amy McBeth said another train carrying grain derailed first, and that this knocked several cars of the oil train off adjoining tracks.

BNSF said each train comprised more than 100 cars.

The state oil and gas regulator said it does not expect the collision to affect oil production in the state.

With files from Reuters