A man and his tiny dog are recovering after being attacked by a bear in Goffstown, New Hampshire

“When I walked out and saw those two bears staring at me right there then panic set in,” Jim Hurley, who was attacked by a bear, told WBZ-TV.

Jim described to WBZ-TV the horrifying moments he and his 10-year-old terrier named Toby were attacked by a bear.

He says earlier this week he let his dog out around 7 p.m. Moments later he heard a terrifying sound.

When he ran out into the backyard, he told WBZ-TV he was confronted by a bear and her two cubs. The bear then took a swipe at him and his dog.

“With a swipe from a wide paw like get out of my way type thing. And the laceration that I have on my shoulder is very consistent with a swipe also,” Jim told WBZ-TV.

Jim and Toby ran back to the house. He escaped with only a cut on his arm, but Toby took the brunt of the attack.

“He sustained deep wounds to his side, his abdomen. No bones were broken, and no organs were impacted. Just flesh wounds,” Jim told WBZ-TV.

Toby had to spend several days in an emergency veterinary hospital. He’s received dozens of stitches but will be okay.

Jim told WBZ-TV he believes the bear was attracted to the rotten apples on the ground in his yard. He also believes the bear was just trying to protect its cubs which is why it attacked.

“I am absolutely ecstatic that Toby is okay, and I feel lucky I am okay,” Jim told WBZ-TV

According to WBZ-TV, Jim says he’s only taking Toby out on a leash now at night and he’s considering getting some more lights for his backyard.