They attack in a blur of white and grey. In an instant, a pleasant day at the beach is transformed into a Hitchcockian nightmare of screams, pecks and flapping wings. Before the victim knows what hit them, their sausage roll is no more.

Now scientists have come up with a simple defence against the menace of food-snatching seagulls. Extensive tests in Cornish towns have found a chink in the bold birds’ armour. They back off from your snacks if you stare them out.

Madeleine Goumas, a postgraduate researcher at Exeter University, ventured to Falmouth, St Ives, Newquay and other popular seaside spots armed with a sealed bag of chips and a stopwatch. When she arrived, she placed the chips about an arm’s length away and timed when the seagulls swooped.

For half the tests Goumas looked away, pretending not to notice the marauding birds, but for rest she locked eyes with the gulls to see if they would have second thoughts. According to her study, published in Biology Letters, eye contact made the birds nervy.

“We found that they are less likely to approach food when they are being watched,” Goumas said. “Sometimes they would jump and stop dead when they realised they were being watched.” Others, meanwhile, skirted the food or meandered around in elaborate paths as if choosing a moment to strike.

Perhaps the greatest surprise from the research is that not all of the seagulls Goumas encountered tried to steal her chips. Of the 74 birds targeted for the study, only 26% were bold enough to touch the food. Among those that did, making eye contact typically held them back for 21 seconds.

“The effect was clearer with some individuals than others,” Goumas said. “For the most part the gulls were wary of me when I was watching them, but there were a few individuals that were quick to approach even when I was looking at them.”

Seagulls on the scrounge. Photograph: Meinzahn/Getty Images/iStockphoto

Food-snatching seagulls have terrorised seaside towns for decades, but as the birds move on to more urban centres, there is a need for better defences. Scarborough council opted for building nets, but others have been more inventive. Some cafes have armed clients with water pistols, while the garden at a Wetherspoons pub in Exeter will soon be patrolled by a bird of prey.

Last month, Alan Amos, a Conservative councillor and the mayor of Worcester city council, proposed a more drastic strategy. Amid tales of pensioners being pecked, and the apparent snatching of Gizmo the chihuahua from his owner’s back garden in Paignton, Devon, Amos told The Sun it was time for a cull. “We must kill the bloody things,” he said.

Goumas favours another approach. “When we do see gulls snatching food from people they tend to come from behind and the people they take food from usually have no idea it is about to happen,” she said. “People can take steps to prevent it. When you eat, being against a wall that blocks a gull’s access from behind, or just keeping an eye out, being more vigilant, reduces your chances of having your food taken.”

Seagulls mob a man carrying a fish and chip box in Largs, Scotland. Photograph: Kenny Williamson/Alamy

While herring gulls have spread into urban areas, their populations have fallen in traditional coastal grounds. The population of the birds in Britain fell by 60% from 1969 and 2015, putting the birds on the UK’s red list of Birds of Conservation Concern.

“If people can take small steps to try and reduce the conflict that would be really beneficial for everyone. Gulls are being vilified. Some people really don’t like them because of behaviours like this, but actually it looks like very few gulls are bold enough to take food from people,” Goumas said.

Dr Viola Ross-Smith at the British Trust for Ornithology has worked extensively with seagulls and has witnessed the full suite of strategies the birds use to deter a threatening presence. “They have dive-bombed me, screamed at me, regurgitated and defecated. It’s not glamorous work,” she said. “But in my experience, if you look at the gulls, they either stay on the ground and look back at you or back off.”

The birds are probably more cautious when humans make eye contact because they realise they are at risk of being attacked, Ross-Smith said. She agreed that the most canny food-snatching gulls seem to attack from behind. “It’s terrible to admit, but I quite enjoy watching gulls do that,” she said.