The magpie is generally sedentary and territorial throughout its range, living in groups occupying a territory, or in flocks or fringe groups. A group may occupy and defend the same territory for many years. Much energy is spent defending a territory from intruders, particularly other magpies, and different behaviours are seen with different opponents. The sight of a raptor results in a rallying call by sentinel birds and subsequent coordinated mobbing of the intruder. Magpies place themselves either side of the bird of prey so that it will be attacked from behind should it strike a defender, and harass and drive the raptor to some distance beyond the territory. A group will use carolling as a signal to advertise ownership and warn off other magpies. In the "negotiating display", the one or two dominant magpies parade along the border of the defended territory while the rest of the group stand back a little and look on. The leaders may fluff their feathers or caroll repeatedly. In a "group strength display", employed if both the opposing and defending groups are of roughly equal numbers, all magpies will fly and form a row at the border of the territory. The defending group may also resort to an aerial display where the dominant magpies, or sometimes the whole group, swoop and dive while calling to warn an intruding magpie's group.