Inverness man filmed his rapes of children
A man who filmed himself abusing children and uploaded the videos to the internet for others to view has been told he could face a life sentence.
Police identified three children Robert McGregor, 35, raped from among child pornography officers found during a search of his home in Inverness.
Intelligence had earlier been received from the National Online Child Abuse Prevention Agency.
A judge at the High Court in Edinburgh has continued the case until January.
McGregor has been remanded in custody.
The court heard that his victims included boys aged three and six.
His home was raided by police earlier this year and laptops and other items were seized for analysis.
Advocate depute Jo McDonald told the court that a search warrant was granted to police after intelligence was received from the National Online Child Abuse Prevention Agency.
More than 2,000 indecent photographs and 899 videos were recovered, many of which were found to contain material at the most extreme level.
The prosecutor told the court: "Some of the images showed children who appeared to be as young as 12 months old."
Some of the videos were found showing McGregor raping and sexually abusing three victims who were later identified by police.
McGregor had uploaded five videos to a peer-to-peer internet app which allowed others to access the footage of his abuse of one of his victims.
Police computer experts found that the files had been accessed by others in America, Germany and in the Czech Republic.
McGregor, a delivery driver, made an initial court appearance charged with possessing indecent images of children and was freed on bail before being assaulted.
Following further police investigations it became possible to identify one of his victims and he appeared again in court facing further charges, including child rape. Bail was then refused by a sheriff.
McGregor subsequently pled guilty to six offences when he appeared at the High Court admitting three charges of raping boys, sexually assaulting a youngster, making indecent photos of children and distributing or showing indecent photos.
His sex assaults on children spanned more than a decade between 2001 and 2014 and all the attacks occurred in the Inverness area.
The child pornography offences took place between 2011 and March this year.
The advocate depute said that McGregor's offending had had a profound effect on some victims.
Defence solicitor advocate John Keenan said it was his intention to seek an independent risk assessment of McGregor following the receipt of initial reports in the case.
The judge, Lady Carmichael, said she would make a risk assessment order and continued the case until January next year with McGregor remanded in custody.
Such an order can lead to the imposition on the offender of an Order for Lifelong Restriction - an indeterminate sentence with the court setting a minimum period to be served in jail but any future consideration of release left to the parole authorities.
McGregor was earlier put on the sex offenders' register.