A B.C. woman is calling her dog a "hero," saying it saved from a bear attack outside of Kamloops.

In a Facebook post, Ashley Gribble says she and her dogs were walking on a trail in the Isobel Lake area on May 5 when they had two encounters with a black bear.

Gribble wrote the bear came out of nowhere, silent and stealthy, and began following her.

In short videos she posted online, Gribble swears at the black bear, shouts "Whoa bear!" multiple times, and reminds herself not to run and to back away slowly.

"I figured it was a momma bear wanting us out of her space. No big deal, I'll happily oblige!" she wrote on Facebook, adding that the bear disappeared up a tree after 15 minutes.

That encounter was just the beginning.

Almost a half hour later and over a kilometre away, Gribble says the bear reappeared.

She used bear spray twice, before tripping over a rock and falling backwards.

"When I was on the ground, the bear just a few feet from me, lunged and I prepared myself for a bite," she wrote.

That's when her pit bull Bane stepped in to protect her, she says.

"This bear picked up my 80-pound dog up like a stick," she wrote on her post.

"I'm screaming and yelling 'help' and then before I even knew what was happening, with adrenaline surging through me, my instincts were taking over and I was running full tilt at the bear with a log," she wrote.

Gribble recalled hitting the bear in the face and head nearly a dozen times with the log until it dropped Bane.

She then dropped into a defensive stance and screamed louder than she’s ever screamed before. Eventually the bear backed away.

"If Bane had not leapt in front of me, I know without a doubt that the bear would've mauled me and most likely would've killed me. He absolutely saved my life," she wrote.

Austin Lord with the BC Conservation Officer Service called Gribble "lucky," and said short of going after the bear to save Bane, she did everything right.

"Right at the staging point where she parked, there’s a big pile of bear scat," Lord said. "So the bear followed her back right after the entire encounter."

Lord and other conservation officers tracked and killed the male black bear the next day, and said the video clearly showed signs of predatory behaviour.

"Slowly stalking. She’s yelling at it. It doesn’t care. It has one thing in its mind: a possible food source," Lord said, adding that the area is popular with hikers and school groups.

"Once a bear learns this behaviour, it won’t stop," he said.

Gribble’s pit bull Bane suffered 26 puncture wounds from bites and injuries from claws. At one point he was in a full body cast, but Gribble tells CTV News Vancouver that the dog is recovering well and is scheduled to have his stitches out later this week.

Speaking to CTV News, Gribble has some advice for those who come into contact with bears in the wild.

"Remember to carry your bear spray somewhere accessible and to always a carry a brand new unopened can."

The British Columbia Conservation Foundation has information on safely using bear spray and tips for dealing with black bears on its WildSafeBC site.