First try to avoid meeting a bear at all, by keeping food and the like out of reach of bears, as well as perhaps avoiding areas with bears. If you encounter a bear, you need to stand still and not threaten the bear. Also, be extra cautious about a female with her cubs. Make sure you identify yourself as a human so that the bear does not attack you, because it probably knows that humans are dangerous or not good food. Do not make any sudden movements, because that makes the chance of a bear attacking you a lot higher. Being in a group is also a great deterrent for bears, because the bears are less likely to come near you if there are more people. Do NOT drop your backpack, because the bear could aim for your food and have to go through you to get it. DO NOT RUN, and certainly DO NOT run away.