A 42-year-old Thunder Bay, Ont., man has his schnauzer to thank after surviving a black bear attack at a provincial park in northwestern Ontario.

The man, who has been released from hospital, was attacked Saturday afternoon by a mature black bear while he was camping at Sand Bar Provincial Park. The dog died following the ordeal.

Ontario Provincial Police in Ignace said the man was on a walk with his two dogs and taking a break near the water when he was attacked from behind by the bear.

The man got away by running into the water, where he waited until the bear eventually went away.

He later attempted to walk back to his camp site, but the bear came back and attacked him again, police said.

One of the dogs, a schnauzer, attempted to fend off the bear, allowing the man to get away. He ran to the park ranger station, where he was treated for non-life-threatening injuries and transported to Dryden Regional Health Centre.

The bear was shot at by park officials and was later caught in a live trap. Ministry of Natural Resources conservation officers, along with the K9 unit, helped to track the bear.

The bear has since been destroyed, the MNR reports, and has been sent to Guelph to be tested for rabies and to check its stomach contents to confirm it was the bear from the attack.