A study into social media during the NATO summit found overall commentary about the event was negative after an increase in police presence - until officers began posing for selfies.
Computer and social scientists from Cardiff University studied community reactions on Twitter during last September's NATO summit in Newport, Wales, which drew world leaders including US President Barack Obama.
They found there were wide variations in public perceptions of the event, with the key findings revealing the overall commentary on social media about the summit was negative in tone.
The study found an initial increase in police numbers, especially highly visible armed officers, generated a negative public reaction, but this was recovered by many of them posing for selfies with members of the public.
The study can act as an example of how police forces could use social media analytics to carry out a 'live' community impact assessment during large scale events.
Researchers were able to measure public reaction to events surrounding the summit, such as the announcement of local school closures and national media headlines which reported on a 'ring of steel' around the summit.
Part of the work also involved analysing the tone of tweets based on location.
NATO organised events in Cardiff Bay, which included a display of warships and a fly-past involving the RAF's Red Arrows, generated a far more positive public mood compared with the disruption experienced in the centre of Cardiff and Newport.