I am looking for the name of a phenomenon where people blindly follow others when they sense a threat
Herd mentality (aka mob mentality) involves people following others without (deliberate) thinking - ie, impulsively or blindly:


  ... describes how people can be influenced by their peers to adopt
  certain behaviors on a largely emotional, rather than rational, basis.


Most experiments in herd mentality involve strangers.  There are other terms for non-impulsive behaviors (Wikipedia lists group intelligence, crowd wisdom, groupthink, deindividuation, and decentralized decision making).

That is contrasted with swarm behavior.  Herd mentality usually refers to individuals conforming to or blindly following others, whereas swarm behavior does not involve individuals doing the same thing:


  ... it is an emergent behaviour arising from simple rules that are
  followed by individuals and does not involve any central coordination.


Rather, in swarm behavior, individuals make different decisions depending on what others around them are doing, such as avoiding predators based on the reactions of others.  Confusingly, "herding" is swarm behavior (in insects it's called swarming; but fish school, birds flock, and mammals herd).