A 28-year-old woman walked away with a fractured skull after managing to fight off a grizzly bear in the US state of Montana.
Amber Kornak had just started her dream job researching the fearsome animals when she was mauled by one on a remote mountain range this month.
She managed to fend off the creature using Mace-like bear spray, then walked nearly two miles to her vehicle.
Ms Kornak is in a stable condition in hospital, a friend said.
Ms Kornak accepted a seasonal position as grizzly bear wildlife technician for the US Fish and Wildlife Service in Libby, Montana, on 10 May.
On 17 May, while on assignment in the remote Cabinet Mountains, she was attacked by the grizzly, agency spokeswoman Jennifer Strickland said.
Ms Kornak was able to reach a canister of bear spray, but accidentally sprayed it on herself before she was able to use it to ward off the animal.
The repellant is made from the same ingredient as pepper spray.
According to a GoFundMe page set up by her friend, Ms Kornak was able to drive away and find help.
She was flown to Kalispell Regional Medical Center, where she received medical treatment for her fractured skull and severe wounds to her head, neck and back.
“She endured 4 gruelling hours of surgery to remove bone fragments and clean wounds to her brain,” her friend’s post on the fundraising page reads.
“Metal plates and screws were placed on her skull and drains were placed in her brain to relieve brain swelling and drain fluid.”
The friend, Jenna Hemer, told the New York Daily News Ms Kornak was “passionate about all wildlife, but her dream and her primary focus was to work with grizzly bears”.
At the time of the attack, she had been working on a study gathering bear hair to analyse their DNA, the Associated Press reports.
Ms Kornak was collecting samples near a stream when she was set upon.
Wildlife officials believe the noise of running water may have allowed the bear to sneak up on her from behind.
On Wednesday, Ms Hemer shared a small note about Ms Kornak’s status: “I have no new updates on her condition other than the fact that she can’t wait to eat pizza.”
Grizzly bears in the US
Grizzly bears are still considered a threatened species in the US, and they are under federal protection in most states.
Last year, Yellowstone National Park removed its protection for grizzlies, though they remain protected elsewhere in the state.
The Cabinet Mountains, where Ms Kornak was working, are home to about 50 bears.
Earlier this week, the US National Park Service proposed to reverse Obama-era rules against using bait to lure and kill bears in Alaska.
The US state of Wyoming also voted this week to allow grizzly-bear hunting for the first time in over four decades.
Woman fights off grizzly bear, then walks to safety