A man barely escaped a bear attack in northern Montana, and it was all thanks to his grandma!

Chase Dellwo said that while the grizzly bear was mauling him, he remembered a magazine article given to him by his grandmother.

The article advised that large animals have poor gag reflexes, so in a last-ditch attempt to save his life, he shoved his arm down the fearsome creature's throat.

Dellwo said the desperation move worked, and the bear left, leaving him severely injured.

The Great Falls Tribune described the terrifying experience, which occurred Saturday near the town of Choteau while Dellwo was bow-hunting with his brother.

It wasn't until he was just three feet away that he realized he was approaching a bear that had been sleeping. The windy conditions meant the bear was as surprised as Dellwo. "I had an arrow nocked, and I put my bow up in front of me and took two or three steps back," he said. "There wasn't any time to draw my bow back." The bear knocked Dellwo off his feet and bit down on the top and back of his head. "He let go, but he was still on top of me roaring the loudest roar I have ever heard," Dellwo said.

After the bear left, Dellwo remained calm and made it back to his brother, who drove him to a hospital 20 minutes away.

He received stitches and staples in his head, including on his face, and had a swollen eye and deep puncture wounds on his leg.

But Dellwo has no ill feelings towards the grizzly. "I want everyone to know that it wasn’t the bear’s fault," he said. "He was as scared as I was."

WATCH: 20-Pound French Bulldog Chases Bears Away from Home

Doctors Are Baffled on Why This Texas Girl Can't Stop Sneezing

'Please Stop, Bear!': Woman Pleads with Bear to Leave Her Kayak Alone

Hunter Survives Brutal Bear Attack, Thanks to 5-Inch Knife