A train carrying crude oil and liquefied petroleum gas has derailed west of Edmonton, Alberta causing an explosion and fire but no injuries, according to the Canadian National Railway.

One rail wagon carrying liquefied petroleum gas on the westbound train exploded and three others also caught fire.

Emergency crews battled the flames and worked to prevent the burning cars from triggering more explosions, a municipal authority spokesman said.

Residents were evacuated from Gainford, Alberta, 85km from the provincial capital Edmonton, which highlighted concerns in Canada about moving oil by rail.

The accident was the third Canadian derailment in recent weeks and is likely to fan opposition to the crude-by-rail boom in Canada as oil producers seek alternatives to congested pipelines.

Rail safety has become a central issue in Canada since the incident in Lac-Megantic, Quebec, in July, when a runaway train carrying crude products exploded in the centre of the town, killing 47 people.

One evacuee of the latest accident, Denise Anderson, said her friend's house burned down as a result of the explosion.

"But I know my son where he's living, they heard it and they saw the fire. They said the whole backyard lit up. So yeah, it was pretty scary. And a friend of ours, their house burnt down from that. I guess the car ended up, the railroad car ended up in their yard," Anderson said.

Local leaders said the local community was pulling together to help their neighbours.

"They have been very calm, they've been very welcoming to each other. They kind of helped each other out, it's a nice rural, small community that really bonds together in a time of need, and really helps to support each other," said Suzanne Merrills, community development co-ordinator for Parkland County.