Do not run. Bears can run faster than 30 miles (50K) per hour – faster than Olympic sprinters.
If the bear is unaware of you, detour quickly and quietly away from it. Give the bear plenty of room, allowing it to continue to undisturbed.
If the bear is aware of you but has not acted aggressively, back away slowly, taking in a calm, firm voice while slowly waving your arms. Bears that stand up on their hind legs are usually just trying to identify you, and are not threatening.
Stand still until the bear stops and has moved away, then slowly back off. Climbing trees will not protect you from black bears, and may not provide protection from grizzlies.
If a grizzly bear does actually make contact with you, curl up in a ball, protecting your stomach and neck, and play dead. If the attack is prolonged, however, change tactics and fight back vigorously.