I had a nerve-racking encounter several years ago on Kodiak Island.
I was hunting blacktail deer and had spotted a nice buck high up on a ridge. The day was overcast, and as I hiked up towards he buck the cloud ceiling started to lower. By the time I got on the same ridge and was getting close, the buck was in and out of the fog and moving away at an angle. I decided to try and get around him by dropping down into a shallow basin and moving in front. As I did, the fog layer dropped even more and was denser than I thought.
I was starting to push through a patch of alders when a brown bear, obviously very close, started huffing and chomping her teeth. I couldn't see her and couldn't really pinpoint where she was by the sound, but she was way too close! It's scary to be that close to a bear when you can see them, even scarier when you can't see them! She pretty much had all of my attention, I forgot all about the buck at this point.
I don't think she had me pinpointed either and she was nervous too, I could hear her breathing. I doubt that she was 50 yards away and I occasionally could hear the alders rustle and knew that there was more than one bear with me by the sounds of it.
I didn't know exactly where they were but I did know where they had not been just a couple minutes earlier, so I started retracing my path out of there the best I could. Fortunately, I made it down the hill without incident. I saw the bears the next day in the same general spot, a sow with two second-year cubs, all beautiful.
I was carrying my .300 Weatherby that trip and took several nice bucks with it. I'm glad I didn't have to shoot a bear!