I've had a few close encounters with black bears (under 50 feet.) In one case, while trail running, I accidentally ran between a mother and her cubs. She was about 20 feet away.

In all cases, I relaxed and looked away from the bear. They almost immediately lost interest and went about their business.

Staring at a bear to take a shot might induce the attack you are trying to avoid. Stopping an attacking bear in its tracks would take a very lucky shot. Encounters usually last just a few seconds. It would be over one way or another before you got the gun out.

I've found the same technique works for dogs, too. If I pretend they aren't there, they leave me alone.

Disclaimer: This is based on personal experience and may not match other popular opinions.
_________________________
http://48statehike.blogspot.com/