Try to detour around the bear if possible. Back away slowly, but stop if it seems to agitate the bear. Assume a non-threatening posture. Turn sideways, or bend at the knees to appear smaller. Use peripheral vision.
Bears appear to interpret direct eye contact as threatening.
Keep your pack on for protection in case of an attack. If the bear makes contact, protect your chest and abdomen by falling to the ground on your stomach, or assuming a fetal position to reduce the severity of the attack. Cover the back of your neck with your hands. If you are attacked at night or if you feel you have been stalked and attacked as prey, try to escape. If you can not escape, or if the bear follows, use pepper spray, or shout and try to intimidate the bear with a branch or rock.