More than 500 children have been identified as potential victims of online sexual abuse during a major police investigation.

As many as 30 million indecent images were recovered during Police Scotland's Operation Lattise which has resulted in the arrest of 77 people so far.

Charges included rape, sharing indecent images of children, some as young as three, sexual extortion and grooming.

Of the 523 "victims or potential victims", 122 have been referred to child protection services.

The operation was carried out between June 6 and July 15, and involved 134 investigations.

More than 390 charges have been brought so far and many of the investigations are ongoing.

The six-week operation drew together resources from across Police Scotland, including prevention, investigation, local policing and specialist teams.

Assistant Chief Constable Malcolm Graham said: "Online child sexual abuse is a national threat, the reality is it is happening now, not only in Scotland but across the world, to children of all ages, from infants to teenagers.

"Operation Lattise was about shining a light on the scale of this issue, it was focused activity to tackle the many forms of online child sexual abuse by identifying those who pose a risk to children online and, more importantly, identifying victims of online sexual abuse and exploitation, as well as preventing more youngsters becoming victims.

"Let me make it clear: child sexual abuse and exploitation, which can range from sharing images depicting the rape, sexual torture or assault of a child to grooming or sexually extorting a child, takes place solely because of decisions made on the part of the abuser.

"Online child sexual abuse is not a victimless crime: children, from toddlers to teenagers, are being sexually abused and exploited now in Scotland and when an image or video clip is shared or viewed, they are being re-victimised.

"Police Scotland is committed to keeping children safe and the protection of children was absolutely at the heart of Operation Lattise.

"All children have a right to protection against abuse, exploitation, neglect and violence. We will continue to work with our partners to protect and promote the wellbeing of all children.

"Our commitment to tackling this horrific threat will continue."

Early years minister Mark McDonald said: "Children and young people should be able to enjoy and learn from the internet, but we also want them to stay in control and know what to do and who to go to if they feel at risk.

"Keeping children safe is a priority for both Police Scotland and the Scottish Government, so although there are many positive aspects to the online world I recognise, there are also risks we have to be aware of.

"The outcomes of the operation will help to inform our child protection improvement programme, where child internet safety and tackling child sexual exploitation is a priority."

NSPCC Scotland policy and public affairs manager Joanna Barrett said: "We are increasingly concerned about the harm caused to children through online activity.

"Too many children are exposed to dangerous and harmful content through the internet or are subjected to online harassment, grooming and sexual exploitation.

"We recently highlighted how the internet is playing an increasing role in the sexual abuse of younger children in Scotland, with a 60% rise recorded over a year in the number of indecent communications offences carried out by adults against children aged under 13.

"It is vital we learn more about the nature and scale of this offending in Scotland, and its impact on children and young people."