SCHOOL police officers have intervened to protect pupils from online sexual grooming and shopkeepers seeking to sell cigarettes and illegal drugs to young people.

The first study to assess the impact of basing police in Scottish schools also found their presence helped reduce violence and antisocial behaviour.

However, the report by Glasgow Caledonian University (GCU) and Robert Gordon University in Aberdeen, based on interviews with the majority of the 55 officers involved, also highlighted a lack of clarity about the role of School Liaison Officers (SLOs).

SLOs were first introduced in 2002. Contrary to the US example where they are on campus to provide security, the Scottish scheme aimed to assign officers to build ties between police, young people and the community.

Researchers found police were able to deal earlier with pupils causing trouble outside of school and "nipping them in the bud" before their behaviour escalated to a point where charges would be brought against them.

One officer told how he had intervened to protect schoolgirls from online sexual grooming.

The unnamed officer told researchers: "It was a 32-year-old guy from London. All these girls were signing him up as friends on Facebook and (having) rude conversations with him.

"Me and the deputy head had 21 cases; 19 girls had him as a friend and were in conversation with him, sometimes at 3 o'clock in the morning."

One officer told how he tackled shopkeepers in his area who were routinely selling "singles" – individual cigarettes – to pupils, while another took action against a store where the owner had been selling drugs hidden in the chiller cabinets.

Most officers reported fewer antisocial incidents involving young people in their area as a result of police in schools.

One officer said he had gone from daily callouts to a school – to deal with everything from serious assaults, drug dealing and antisocial behaviour – to none.

He added: "We have never had as low calls for youths and antisocial behaviour during or outside school hours as we do now."

Dr Li Frondigoun, GCU sociology and criminology lecturer and report co-author, said: "Our work suggests that, in the main, campus officers have had a number of positive impacts, including reducing the number of violent incidents and callouts in and around schools and building strong, long-lasting relationships with pupils.

"These relationships have helped to support some hard-to-reach young people and they have also led to an improved flow of information, which officers have used to combat criminal activity such as the sale of drugs and gang-related violence."

There are 65 secondary schools in Scotland with their own assigned police officer, some of whom are assigned to more than one school.

However, some interviewees said they initially encountered a frosty reception from some staff who were unsure why they were there, or a false expectation they "would be present to enforce discipline in the school".

The researchers found a lack of prescriptive job description could lead to tensions between the police officer and their school, but also noted some officers were happy to define their own role.

Dr Iain MacLeod, RGU postdoctoral researcher and co-author of the report, said: "The fact that there are still misconceptions about the reasons for deploying campus officers and about the roles they should fill once they are in post, suggests that more work needs to be done if the Campus Officer programme is to deliver its full potential."

The Scottish Campus Officer: Past, Present and Future report will be presented this week at GCU's first annual research day.