Scientists found that the birds would "join in" defensive mobs that were instigated by neighbouring birds they were familiar with.

The findings are published in the journal Biology Letters.

"Joint mobbing" - birds ganging up to fend off predators - has been seen in many bird species.

But the researchers were particularly interested in the phenomenon in great tits because, in their previous work, they noticed that the birds' lives were affected by the birds they lived next door to.

Ada Grabowska-Zhang from the University of Oxford led the study. She explained that great tits with "familiar neighbours" - birds that had occupied the nestbox next door for several breeding seasons - successfully raised many more chicks.

"I thought this might be something to do with [protection against] predators," she told BBC Nature. "Because this clearly affects breeding success.

"Great-spotted woodpeckers, for example, can put their heads into nestboxes and pull out large chicks."

The birds offset this threat by responding to approaching predators aggressively - swooping, diving and alarm-calling in an attempt to put off the woodpecker, weasel, or whatever creature is trying to make a quick meal out of their defenceless young.

To find out if the birds reacted more readily to the alarm calls of a familiar neighbour, the researchers studied birds in a nestbox population that they had monitored for their research over several years.