The best thing to do to safely remove yourself from a bear confrontation is move away slowly and sideways so you can keep an eye on the bear without tripping. Bears are not threatened when you move sideways, but like dogs, they will chase fleeing animals.
“Do not climb a tree. Both grizzlies and black bears can climb trees. Do not push down a slower friend (even if you think the friendship has run its course),” the NPS added. “Stay calm and remember that most bears do not want to attack you; they usually just want to be left alone. Don’t we all?”
Another tip is to identify yourself by making noise, specifically your voice, so the bear doesn’t confuse you for an animal and knows you’re human. While a curious bear might come closer or stand on its hind legs to examine and smell you, it is not threatening.
To avoid an encounter with a bear, hike and travel in groups, do not allow bears access to your food and leave the area if you see a bear.
If you are attacked by a brown or grizzly bear, leave your backpack on and play dead by laying flat on your stomach with your hands behind your neck and legs spread. If the bear continues to attack you, fight back by hitting the bear in the face.
If you are being attacked by a black bear, do not play dead but instead try to escape to a secure place or if you can’t, fight back using any available object, according to NPS.