A species of songbird has been shown to identify individual people in a crowd in order to target them aggressively if they pose a threat to their nests. North American mockingbirds can distinguish between individual men and women out of many thousands based on whether they have a history of getting too near to their nests, a study has found.

It is the first time that anyone has shown that wild birds are able to tell people apart and is one of the rare examples of one species being able to distinguish between individual members of another species, scientists said.

The mockingbirds in the study quickly learnt to identify people who regularly came too close to their nests on a busy university campus populated by thousands of passing students. The birds responded to further encroachments by screeching, dive bombing and sometimes grazing the heads of the intruders.

However, this extreme aggression was limited to those people who had already come too close to the birds' nests on two previous occasions. First-time human intruders were treated with far less aggression, the scientists found.

"We tend to view all mockingbirds as equal, but the feeling is not mutual. Mockingbirds certainly do not view all humans as equal," said Professor Doug Levey of the University of Florida in Gainesville, who led the study published in the Proceedings of the National Academy of Sciences.

"We do not believe mockingbirds evolved an ability to distinguish between humans. Mockingbirds and humans haven't been living in close association long enough for that to occur. We think that our experiments reveal an underlying ability to be incredibly perceptive of everything around them, and to respond appropriately when the stakes are high," Professor Levey said.