A group of hunters near Igloolik, Nunavut, had a harrowing experience when they were attacked by a polar bear that was with her cubs.

The bear died after the hunters shot it.

On Wednesday, five men went out to retrieve their cache of Igunaq, or aged walrus meat, when the bear attacked them.

John Arnatsiaq, 58, squared off against the bear after it went after his friend.

"All of a sudden the bear was right there. But it wasn't going for me – it was going for the other guy," said Arnatsiaq.

Arnatsiaq jumped in between the two and shoved a hammer in the bear's mouth.

The group was out near Igloolik, Nunavut, Wednesday to get their cache of Igunaq, or aged walrus meat. (The Canadian Press)

"What I did was poke the bear with the hammer and put the hammer in its mouth and pull to make him angry so it will go after me instead of going after that guy. Because I knew that guy had bullets in his pocket and that his rifle was not loaded," said Arnatsiaq.

Arnatsiaq said the bear kept going for his friend and swatted Arnatsiaq away. Arnatsiaq grabbed the bear's fur and kept swinging the hammer.

"And then we were fighting for a few minutes and then I missed my footing and almost fell. That's when the bear was going for my shoulder," he said.

The bear bit into his hand which was covering his shoulder. At that point, the other hunters were finally able to shoot the bear and the cubs, which had joined in the fight.

"It could have been worse, I'm fine, I'm ok," he said.

Arnatsiaq said the bear was hungry and wanted the walrus meat.

Arnatsiaq didn’t escape unscathed – the bear also bit his face, requiring him to get five stitches in his lip. He said his body is also sore.

Arnatsiaq has had close polar bear encounters before. In the past, he smashed a bear on the nose with his camera.

"First time with a camera, this time with a hammer. Probably no more next time," he said.

Polar bears are the largest terrestrial carnivores on the planet. Adult female bears can weigh up to 295 kilograms and can grow to nearly 1.5 metres in length.