Park wardens in Banff National Park have been trying out a new way to keep bears away from railway tracks that run through the area.

Two enclosures have been built in the park, complete with railway tracks that are meant to teach bears to steer clear of the tracks.

One enclosure is in Banff while the other is in Yoho.

Yellow mats have been placed at the entrance to each enclosure and an electric current has been set up in the mat to shock the animals.

Researchers are hoping that the bears get the message to stay away.

Authorities say that the new method is working - one male grizzly was shocked that the first site and then stayed away from the other.

“Our over arching objective is to come up with mitigations. In year four and five we'll be trialing those mitigations on the rail line, and that we will be moving to put mitigations on the ground at the end of the research project,” says Rick Kubian with Parks Canada.

During the test period, four grizzlies tried to unsuccessfully cross the mats along with 11 black bears, five wolves, a coyote, and a wolverine.