Fish living close together may show territorial behavior, the tendency to occupy and defend an area, usually to eat and reproduce there. There are many different patterns of territorial behavior. Some species are territorial all the time, but others may only display this behavior during reproductive periods. Depending on the situation, fish may be territorial against their own species, toward other species, or both.
Territorial behavior requires a lot of energy, and a fish cannot afford to expend more energy on defending its territory than it takes in as food. For this reason, fish have developed several threatening displays that involve
a lot of posturing and ritualized motions yet conserve energy. If an intruder gets close to a damselfish’s alga garden, for example, the damselfish first attempts to scare it away with a threatening posture of spread fins and gill covers. If this strategy does not solve the problem, the damselfish makes excited, aggressive movements. Only as a last resort will it attempt to chase away an intruder, as actual chase could lead to a fight that might end in the death of the defender.