If a city has a plague or an earthquake, the residents of that city fast and blow shofar, and neighboring cities fast but do not blow shofar; Rabbi Akiva says they blow shofar but do not fast. A plague is when a city of 500 able-bodied men (in addition to women, children and the elderly) has three people die on three consecutive days. Fewer than this is not considered a plague.
For the following crises, shofar is blown in all places: a hot wind that ruins crops, a plant infection, locusts and other plant-destroying infestations, wild animal attacks, and armed forces. For all these shofar is blown because they are forms of danger that migrate from place to place.