The attack happened just a few miles from the finish line, Karen Williams wrote on Facebook.

She had hit a “little rise” in the marathon course, where there was “some sort of seep or pond or mucky area,” she wrote. That’s where she came across a bear, which was about 15 feet away — and charging toward her.

Williams said that she screamed “No!” as she put her arms up.

Then, she spotted the bear cub.

“I was on my [rear] and being raked with claws and bitten,” wrote Williams.

She was the victim of a bear attack, which left her battered but still alive. New Mexico Department of Game and Fish said in a news release that the incident at Valles Caldera National Preserve occurred June 18, when “the victim surprised a mother bear whose cub ran up a nearby tree.”

“I cried out in pain and Mama bear did not like that so she hit me with a left hook and bit my neck and started to try to shake me,” Williams wrote, recalling the attack. “I rolled into a ball and played dead.”

Apparently, it worked. The mother bear left Williams and made its way over to a tree that her cub had climbed.

“The cub cried a bit while trying to get down the tree,” Williams wrote. “Mama bear kept glancing my way to make sure that I was still ‘dead’. I was at that point afraid I might die.”

Authorities tracked down the female adult black bear that attacked Williams, a release stated. The bear was euthanized, sparking outcry from some wildlife organizations and members of the public, who argued the bear shouldn’t have died for defending her cubs, who might not survive on their own. Alexandra Sandoval, director of the Department of Game and Fish said in a statement, called it “regrettable.”

But on Sunday, one week after the mother bear was euthanized, the department announced that it had found and captured the bear’s two cubs. The cubs were chased by dogs into a tree on Saturday, and they climbed up almost 90 feet, a statement said. Using a boom truck borrowed from an electricity company, a department wildlife officer used a catchpole to snag the bears from the tree without tranquilizing them, the department said.

The male and female cubs, which each weighed about 10 pounds, were transferred to the care of a veterinarian, and officials said they will be rehabilitated and released into the wild.

“While this positive outcome doesn’t negate the sadness we all feel about last weekend’s events, it does lighten our hearts knowing the bear cubs are going to survive and be returned to the wild in the future,” said Jorge Silva-Bañuelos, the superintendent of Valles Caldera.

Williams suffered serious injuries to her upper body, head and neck during the encounter, the game and fish department said. She was airlifted to a hospital for treatment.

“We were very panicked. We had Park Service rangers with us; they immediately got all their processes going,” race director Kris Kern told The Washington Post in a phone interview, in which he said officials learned of the attack via text message. “They alerted dispatch, 911, their headquarters.”

​The attack, which occurred during the Valles Caldera Runs, happened after Williams‎ had left an aid station and had traveled about a mile through a large meadow, Kern said.

“Just before she left the meadow, she ran into the bear,” he said.

The adult bear was part of a study and was wearing a collar with a tracking device, which helped authorities determine where it was when the attack occurred. The release said that officers were “confident” that they captured the correct bear.

“After 14 hours at UNMH and a cool helicopter ride and a very bumpy ambulance ride prior it turns out that I have a fractured right orbit from the mean left hook, missing parts of eyelid and eyebrow, injury to the belly of my left bicep and a lot of punctures and lacerations,” Williams wrote on Facebook. “But I am alive.”

Read More: