Colin Dowler might not be alive today if it weren't for a small pocket knife with a two-inch blade and five forestry workers.
The Canadian man was mountain biking on a logging road in the remote backcountry of British Columbia, roughly 300km (185 miles) north of Vancouver.
He was exploring potential hiking routes on Mount Doogie Dowler - he and his brother had plans to climb the mountain named after their grandfather.
He was heading back home after spending the night in the woods when he came around a bend and saw a grizzly bear.
At the time he didn't know that he would end up in a life-or-death struggle with the animal - and that his luck would turn after the attack.
He was hoping that like most bears, it would prefer to avoid human contact and head back into the woods.
Unprovoked bear attacks - provincial conservation officers believe this is such a case - are extremely rare.
He was about 100ft (30 metres) from the bear - "too close in my opinion", he told the BBC by phone from his hospital bed.
As he was considering what to do - ride away, cycle past the bear, or stay still - the animal kept walking towards him at what seemed a natural pace.
Mr Dowler took off his backpack and grabbed one of his hiking poles as "some semblance of a deterrent" and stepped off his bike to keep it between himself and the grizzly.
"There was a point - I was scared the whole time - but I thought, 'Man, it would be cool to be catching this on video,'" he said.
The grizzly kept walking forward - parallel to the bike until its rump had almost passed the rear wheel. Then it "made a hard turn to the left" to get behind him.
But Mr Dowler says at that point he went from "uncomfortable to wildly uncomfortable".
'I could feel the hot blood'
Keeping his bike between him and the bear, he gave it a firm poke with the hiking pole, which led to brief a tug-of-war.
He remembers negotiating with the bear, saying "I know this is your territory, I'm just passing through - we don't have to do this".
The grizzly kept coming at him with "methodical, heavy swats" and - as those swats got heavier and stronger - Mr Dowler threw his bike towards it.
That's when it came for him, biting deep into his abdomen below his ribs.
"It was so much pain and weirdness, I could feel the hot blood," he says. "I'm being rag-dolled, suspended by my flank by a bear carrying me."
It dropped him near a ditch about 50ft away and began taking deep bites into his thighs. He tried gouging at the bear's eyes, and briefly, playing dead.
He then reached for a pocket knife in his right pants pocket - it was painful to do so as he could hear the grating of bear teeth on bone - and went for the bear's neck. There was a rush of blood and the bear let go and walked away from him, back towards where it had come from.
Mr Dowler used the knife to cut off a shirtsleeve to use as a tourniquet around his wounded leg. He recovered his bike and cycled 7km (4.5 miles) to a logging camp, where he collapsed.
He said that is where his luck turned. There were five men at the camp and all of them knew first aid.
"They just went to work, doing their best to save my life," he said. "They're truly the heroes of the story because there's no way I would have made it without [them]."
They also called an air ambulance, and emergency workers gave him a likely life-saving blood transfusion before he was flown to a Vancouver hospital, where he is now slowly - and painfully - recovering from the 29 July attack.
Provincial conservation officers tracked the bear in the woods and it was put down. They say they are confident it was the same bear that attacked Mr Dowler, because it had a knife wound in its neck.
British Columbia is bear country - there are about 15,000 grizzlies in the province and anywhere from 120,000 to 150,000 black bears.
The province gets between 14,000 to 25,000 calls in a year about bear sightings or conflicts, and the main cause of conflicts is due to bears who have developed a liking for human food sources like improperly stored garbage or dirty barbeques.
A small percentage of calls end up with the bear being killed because it has become a danger to the public.