A primary school worker abducted a young girl and took a naked picture of her.

James Moran, of Dalmarnock, Glasgow, led the child to a store cupboard at her school as she made her way back from the toilet.

When she refused to remove her clothes the 32-year-old stripped the schoolgirl naked.

The child identified Moran as her attacker after telling her teacher about the ordeal.

Moran pleaded guilty to abducting the girl on May 2.

He admitted sexually assaulting her by causing her to participate in sexual activity, forcing her to remove her clothes and underwear, and taking a naked picture of her.

Sheriff Alan Mackenzie sentenced Moran to three years in jail and put him on the sex offenders register indefinitely.

He told Moran: "The offences are of the utmost gravity. I am in no doubt, as has been recognised, no other disposal other than a custodial one is appropriate."

Glasgow Sheriff Court heard Moran carried out work at the school like moving furniture and litter collection and had no direct contact with children.

He was described as a "loner" who had "limited communication skills".

Defence lawyer Bill McCluskey said his client was "painfully shy".

He said Moran's family have been the subject of online abuse as a result of his actions and he was keen not to put the child's family through a court process.

Detective inspector Fiona Hill said: "This was a very disturbing crime which took place within a primary school, where all children should be safe.

"James Moran is undoubtedly a dangerous predator and his young victim must have been absolutely terrified during the ordeal he put her through."

She added: "Thankfully due to the quick actions of the school and the officers who attended, Moran was apprehended shortly after the incident and held accountable for his actions.

"This type of despicable behaviour will not be tolerated and I hope today's outcome provides some comfort to the victim's family as well as the wider school community."

An NSPCC Scotland spokesman said: "These were highly disturbing and predatory offences against a young child which were carried out in an environment where she should have felt secure.

"Anyone working in a school has a responsibility for child safety but Moran used his proximity to children to carry out this appalling attack.

"His victim must be praised for her bravery in alerting teachers and identifying her attacker. Sexual abuse ruins childhoods and it is vital that she now receives full support to recover from her ordeal."