One woman risked her life when one of her dogs was attacked by a black bear in her Linden, Virginia, backyard.

WHSV reported that Judy Milden let her dogs out into her yard Saturday night before she went to bed.

>> Read more trending stories

She soon heard her dogs barking, but thought they were reacting to raccoons in the area. She then realized they were barking at a mother bear that was protecting her cubs.

The bear was attacking one of Milden's dogs a few feet from her porch, so she stepped in.

"I wasn't even thinking about anything with me. I was just worried about the dog," Milden said.

When Milden tried to help, the bear hit her, knocking her back onto her porch.

"When I was on the ground I was thinking, oh my God, I've got to get in the house with my animals, because they were right there and I got to get up and get in," Milden said. "And that's exactly what I did."

She and her dog have a few wounds, but they are healing.

If it happened again, Milden said she would do the same thing but she is taking steps to ensure bears are not lured into her yard.

"Don't leave your trash out. We aren't even feeding the birds anymore. We can't. I mean I don't want that to happen again, and I don't want anyone killing bears either," Milden said.