Just in time for the release of the new iPhone, a man in Canada has found yet another new use for the cellphone — thwarting a polar bear attack.

Garett Kolsun says he used his cellphone to scare off a 400-pound polar bear on the attack, using the light from the handset to startle the animal long enough to allow his escape.

Kolsun, in Churchill, Manitoba, on the shore of Hudson Bay — a town known as the "polar bear capital of the world" because of the large number of animals that pass through the area during an annual migration — got away with only a few claw and bite marks.

According to Canada's CTV News, Kolsun was walking home from work early Saturday in the town of 1,000 when the he noticed something out of the corner of his eye.

" 'I turned and looked, and it was a polar bear charging towards me,' the 40-year-old told CTV in an interview Monday. 'I started running from it, looking for some place to go and get away from this bear.'" 'I stopped and I turned around to face the bear,' he said. 'It was already there, right on top of me. I started shouting, yelling, screaming, waving my arms, running backwards to keep my eye on the bear.' "

CTV says the bear "pinned [Kolsun] against the door and swiped at him with his paw. The bruin, which stood about 1 1/2 metres [5 feet] tall, also sank his teeth into Kolsun's hip, although Kolsun says that, at the time, he didn't even realize the bear had punctured his skin."

That's when, in desperation, Kolsun fished his cellphone from his pocket and turned it toward the attacker, activating the light. "When it turned its head, I just turned and ran as fast as I could," he told CTV.

The man was treated and released at a hospital and was back at his job as a Canadian Border Services guard on Monday morning.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.