Canmore, Alta., has declared a local state of emergency after heavy rainfall made the banks of a creek that runs through the town unstable.

About 40 homes south of the pedestrian bridge over Cougar Creek were evacuated at 2 a.m. MT on Thursday, Canmore Mayor John Borrowman said.

"The situation is actually bad and getting worse," he said. "Now some of the smaller creeks are starting to flood."

The evacuees were taken in at the town's civic centre and at two local hotels.

Other residents are being alerted to be ready to move if necessary.

Power is out at various locations throughout the town, officials said.

Both the Trans-Canada Highway and Highway 1A are closed to eastbound and westbound traffic at Cougar Creek.

"We do not advise travel this way," said Canmore RCMP Const. Jeff Jantz.

"Don't come."

Crews are using heavy machinery to try to redirect some of the surging water into the Bow River, he said.

Canmore is about 100 kilometres west of Calgary.

To the east and south, a flood warning has also been issued for Kananaskis Country as the Sheep River threatens to burst its banks in the Okotoks area.