UPDATE 10:00 am MT Saturday, August 3: Cypress County says crews worked overnight to repair the rail line and train traffic is expected to resume Saturday. The cause of the derailment remains under investigation.

UPDATE 11:30 pm MT: The evacuation alert for Irvine, Alta., has been lifted. Residents are now able to return home.

UPDATE 10 p.m. MT: Trans-Canada Highway has reopened in both directions.

A train derailment in southern Alberta forced an evacuation and shut down part of the Trans-Canada Highway for several hours.

Between 12 and 15 cars left the tracks near Irvine, Alta., on Friday afternoon, police said, and some may contain flammable cargo.

As of Saturday morning, Cypress County says crews worked overnight to repair the rail line and train traffic is expected to resume soon. The cause of the derailment remains under investigation.

Residents are also able to return to their homes.

The derailment involved "chemical exposure" according to Alberta Emergency Alert, which told residents within a seven-kilometre radius to evacuate the area immediately.

The train derailed on the west side of Irvine — a community of about 300 people, some 35 kilometres southeast from Medicine Hat — along the north side of Highway 1 in Cypress County, officials said in an alert sent at 4:52 p.m. MT.

"Cypress County has declared a state of local emergency and is working with stakeholders and partners to assist in the evacuation," the county said in a release Friday evening.

RCMP and fire officials were assisting.

Canadian Pacific Railway says the derailment happened at about 3:20 p.m. MT and they "dispatched teams to the site."

Cypress County declared a local state of emergency after the derailment. (Jennifer Radisic/Facebook)

Train, grass on fire

"One of the train cars was on fire and then the grass lit on fire, so they closed the highway," Lethbridge resident Trehia May Stevenson, who drives that stretch of road often, told CBC News.

She says she was there shortly after the accident — "before the first responders."

"I was about five minutes behind the derailing. There were about 12 cars that derailed, maybe more, and none of them were tankers. It was close to the back end of the train and the rest of [the] train was still on the track."

'Quite a sight'

Irvine resident Jennifer Radisic was in her backyard with her fiancé when they heard the collision.

"We got in our car and went and checked it out. It was quite a sight to see," Radisic told CBC News Network.

"My biggest concern was the fire, because it was — the wind was literally coming right toward Irvine. Fire crews got there really quickly and doused the flames."

Between 12 and 15 cars left the tracks, police said, and some may contain flammable cargo. (Trehia May Stevenson/Facebook)

On their way back to their house they were stopped and told to leave the area. Radisic says they were allowed to return home to get supplies for her young daughter.

She said the Red Cross has been helpful with information, but didn't know about any chemicals on the train.

"It just smelled like smoke to me, so I'm not sure what it is exactly. They're not saying, we haven't been told anything. We've just been told that it's hazardous material," she said.

Canadian Pacific Railway says the derailment happened at about 3:20 p.m. MT. (Trehia May Stevenson/Facebook)

How to evacuate

Residents are being told to go to the Cypress County Administration Office in the hamlet of Dunmore, at 816 Second Ave.

Range Road 30 should be used for people who live north of the Trans-Canada. Turn west on Township Road 124 and head to Highway 41 to access Highway 1 into Dunmore.

People who live south of Highway 1 are asked to use "Township Road 114A to gain access to Highway 41, or are asked to use the Bull Trail and turn west onto Township Road 110A to access to Range Road 32 to head south to Township Road 110 and then turn and head west along Township Road 110 to the Eagle Butte Road to provide access to the hamlet of Dunmore," the agency said.