A woman working her “dream job” as a bear researcher walked two miles with a fractured skull after being mauled by a grizzly last Thursday in northwestern Montana, officials said.

Amber Kornak, a U.S. Fish and Wildlife Service seasonal field assistant, is recovering after suffering two skull fractures and severe cuts to her head, neck and back. The 28-year-old was working alone near a stream in the Cabinet Mountains when a bear attacked her from behind, Kornak’s friend Jenna Hemer wrote on a GoFundMe page.

Agency spokeswoman Jennifer Strickland said Kornak was able to grab her Mace-like bear spray while being mauled and blasted the grizzly, ending the attack. Kornak inadvertently sprayed herself in the process.

EAGLE SNATCHES FOX HOLDING RABBIT IN MOUTH IN DRAMATIC IMAGES

Kornak, bleeding from her injuries and suffering fractured skull, managed to walk two miles to her work vehicle and drove to find help. Hemer said the researcher went through four hours of surgery, where she had bone fragments removed.

“Metal plates and screws were placed on her skull and drains were placed in her brain to relieve brain swelling and drain fluid. The lacerations to her scalp, neck, and back were also debrided,” Hemer said.

The attack came only a few days after Kornak began her dream job. She was working on a genetic study that requires collecting grizzly hair samples that are found on trees or other objects bears rub against. Officials believe the researcher didn’t hear the bear approach her due to noise from the nearby Poorman Creek.

"She's obviously passionate about all wildlife, but her dream and her primary focus was to work with grizzly bears," Hemer said. "Last I spoke with her was yesterday [Monday] and she's making great strides but it's going to be a long recovery."

14-YEAR-OLD HUNTER'S ENCOUNTER WITH BEAR CUB GOES VIRAL

Strickland said Kornak appeared to follow the right protocols for working in grizzly bear country, including carrying bear spray and a satellite communication device that she used to call 911 just after the mauling.

Kornak was in stable condition as of Monday and recovering in the Intensive Care Unit. Hemer set up a GoFundMe page to pay for Kornak’s medical expenses.

“Anyone who knows Amber knows that she is fierce, and will fight like hell to recover as quickly as possible,” Hemer said.

The Associated Press contributed to this report.