Wow! The captain is very lucky to be fast
I saw the bear only 2 times up close, he just passed by, not interested in us (me and 2 friends). I can share what local hunters taught me:
Bear spray is a great thing, they have a very sensitive sense of smell and most bears will be scared off by it. If the bear is far away and approaching, one option is to spray yourself with the spray (skunk/possum-like tactics). A weapon is of little use if the bear is angry and decides to attack, especially female with cubs. You can't show fear outwardly like this guy:
https://www.youtube.com/watch?v=3N8-hLtciZoThe best way is to be visible to the bear so that it knows that you are there and that you are a person. Wear a bell or a jingle, talk loudly, bears do not like the sound of metal ringing, that is, you need to periodically tap metal, maybe on a pistol or a gun. A good way is a flare or a flashbang grenade. Hold the flare in front of you and slowly back away. Throw the flashbang grenade at your feet, open your mouth and close your ears and eyes
A big problem is an untrained dog. Even if the bear is not interested in attacking and is passing by, the dog may break free or not obey the command and attack the bear. In this case, the bear may chase after it and come to the owner of the dog, and then it will be dangerous
With semi-wild, stray and simply aggressive dogs, a good way is a stun gun. They are afraid of the sound of lightning and run away in all directions. My friend's mother lives on the outskirts of the city, where there are many packs of stray dogs. They attack children and lonely elderly people. I bought her a stun gun. When the dogs surrounded her, she turned it on and everyone ran away, except for one very aggressive and large one, but she just held the stun gun between herself and the dog and it could not come closer than 3-4 meters, dog was afraid