A marathon runner in New Mexico is recovering after she was attacked by a bear near the end of the 26-mile race.

A marathon runner in New Mexico is recovering after she was attacked by a bear near the end of the 26-mile race.

Karen Williams was running in the Valles Caldera Runs Marathon on Saturday when she encountered the bear.

The race, which also included a 10K and a half marathon, took place along the trails of the Valles Caldera National Preserve.

In a post on Facebook, Williams wrote she was about 23.5 miles into the race when she crested a hill.

When she got to the top, she noticed the bear charging at her. Williams said she also saw a cub, leading her to believe the bear was a female protecting her young.

"Then I was on my ass and being raked with claws and bitten," she wrote. "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."