I have been very close to black bears a few times,in two of those instances sows with cubs.Similar situation as Fran's sneaking along slowly only to find myself in a location I didn't want to be in.I came up on a snoozing sow with two cubs (also snoozing) a few years ago,I was within 20 yards.I was like oh crap I am way closer to these guys than I would like to be.I snuck away slowly and never woke them.
I fortunately have never been chased or bluff charged or had one pop it's jaws at me.I understand the running to get out of it's personal space zone but I always feared that would ilicit a predatory response and encourage a bear to chase.
With pepper spray they suggest that the bear be almost on top of you before you release the stuff,hopefully my adrenaline filled brain would be able to wait that long.If I hunted in grizzly or brown bear country I would have the biggest semi auto that browning makes (.338?) pepper spray and a serious side arm.Oh yeah and my bow

.
Two years ago I arrowed a black bear was walking up to it after watching it fall and saw a very large boar about 50 yards away,with me standing about 5 yards away from the bear I killed.I didn't like that feeling! I clapped my hands and he took off like he was on fire.