They were trusted members of the community. Men with wives and girlfriends, church elders and charity workers, teachers and bank workers, well-educated and well-respected.

Yet they were members of Scotland's biggest paedophile ring - committing crimes beyond the comprehension of society, betraying the trust of family and friends and destroying the lives of their victims, the youngest just three months old.

The ringleaders were James Rennie and Neil Strachan. They separately used their position as babysitters to carry out horrific sexual abuse of at least three pre-school children. They photographed the attacks, boasted of their actions and swapped pictures and perverted fantasies in internet chatrooms.

Rennie was a community worker, a fellow of the Royal Society of Arts and chief executive of LGBT Youth Scotland, an organisation that supports young people in dealing with their sexual orientation. A trained teacher, he had advised the Scottish parliament on gay rights and was known for his charity work.

Those who knew him say he appeared warm, generous and approachable, but Rennie was leading a double existence. On the internet, he used the nickname "Kenny Plover" and the email address "kplover99" - a sick joke standing for "kiddie porn lover."

Rennie, 38, displayed a deviance beyond the common imagination, sharing images with paedophiles across the UK, the Netherlands and America, procuring many of those images through adverts scrawled on the walls of public toilets.

He was trusted to baby-sit regularly for a couple whom he had met while a student at Heriot-Watt University in Edinburgh. But he had begun to abuse the boy he called "his nephew" when he was aged only three months old.

On the internet, under the guise of "Kenny," Rennie would refer to the baby he was abusing as his "neph" or "the b".

In one exchange of messages, Rennie offered: "I would like to share my b with you as it is much hotter than solitary."

He added: "I might have the b this weekend if you are interested."

Among the messages he received in response was from "Mark". It was Neil Strachan, a 41-year-old who had already been jailed for three years in 1997 for repeatedly molesting a young boy while he was an official at a youth football club. He started abusing the child when he was five years old and the abuse went on for two years.

Strachan, who was then 28 and married, quit his post as secretary of Celtic East Boys Club in Edinburgh after he was caught. When he was jailed, it emerged that he had also been convicted of a similar sex offence 12 years previously.

Strachan was diagnosed as HIV positive in June 2007. From the messages he sent to Rennie, it was clear that he was now abusing another child. "We will need to meet and swap vids," he wrote.

A photograph sent on the internet, which was known as "The Hogmanay Image", became a critical piece of evidence in the trial and showed a man engaging in graphic sexual abuse of a toddler. Electronic data showed experts it had been taken an hour before midnight on December 31, 2005.

Using testimony from an American digital evidence expert and a top Scottish forensic pathologist, the man in the photograph was shown to be Strachan. The toddler, however, has never been identified.

In email exchanges, Strachan, 41, showed an unrestrained excitement when he discovered his young boyfriend Colin Slaven not only shared the same depraved tastes as himself but had access to two children, named only as JL and B.

Strachan emailed Rennie with his news and described how he has abused the two boys, aged six and just 18 months, who Strachan and Slaven would babysit for overnight.

Slaven, from Kirkcaldy, who was only 16 when he began his on-off affair with Strachan, had used his IT skills in a number of admin jobs in Australia and Edinburgh, including work for the Scottish Legal Aid Board.

He was described in court as an articulate and intelligent man with respectable qualifications.

Slowly, police began to unravel the web of emails stored in Strachan's computer. One such email led police to Glasgow and Neil Campbell, an elder of Jordanhill Parish Church. A 46-year-old married man, he was member of the parish handbell-ringing group.

For a year he worked at Jordanhill School after-school club, having passed checks by Disclosure Scotland. He is also known to have helped out with Jordanhill's Sunday School and regularly sang with the church choir. Congregation members spoke of Campbell's star turn in the annual nativity play In court Campbell, who has a previous conviction for fraud, gave his occupation as manager of a cake company but he is also known to have worked for Marks and Spencer.

He was careful to hide his collection of child images and email conversations from his wife Helen but in other regards he was careless; she was aware he had a gay lover and on several occasions he welcomed John Milligan into their home.

"If someone had said that Neil was gay it would have come as no surprise, but to believe that he is a paedophile is a horrifying stretch of the imagination", said one church-goer.

"He was a big, cuddly bear of a man and appeared to be completely harmless.

From the outside, the Campbells' marriage appeared to be one of comfortable affection, rather than one of passion. Both were popular figures within the church community. Indeed, since Campbell's arrest, members of the close-knit congregation have closed a tight circle around his wife, such is their respect for the woman described as an essential part of the "glue holding the church together".

Police next arrested Craig Boath and John Milligan, who had also been in email contact with Strachan. Boath, 24, had a short-lived affair with Rennie, travelling from his home in Dundee to Edinburgh to watch child pornography with him.

The insurance claims adjuster was found to possess 27,000 indecent images, many of which were described as extremely disturbing pictures of very young children, prompting the Advocate Depute to say they would make a "decent person feel physically sick".

Boath was out for dinner with his mother when police raised the family home and seized his computer equipment.

More than 125,000 videos and images were found. Milligan alone possessed 78,000 of those. The 40-year-old civil servant was a self-professed loner.

Boath and Milligan were often in contact. During one chatroom conversation Boath commented that he has not heard from Rennie for some time and the two joked that perhaps Rennie had already been "busted".

Many elements of the trial are so disturbing they have been left largely unreported. There are no words to outline the desires expressed by each of the men, and the deeds acted out on the young boys JF and Child F.

As the net closed around them, some used desperate excuses to try to escape prosecution. Campbell criticised his treatment at the hands of police, Slaven claimed to have been in Australia when the images were downloaded to his machine and, a touch bizarrely, John Murphy claimed a burglar had broken into his flat and uploaded pictures to his laptop.

Murphy, however, is no stranger to controversy. In 1995, the then assistant principal drama teacher at Claremont High School in East Kilbride was convicted of engaging in an indecent act in Glasgow's City Centre with two other men.

He was sacked and struck off by the General Teaching Council for Scotland but the conviction was overturned a few months later by three appeal judges in the Court of Session. However, he returned to teaching at Coatbridge College, and is understood to have taught special needs children at an Ayrshire school.

He tried a brief career as a nightclub DJ before taking a job as receptionist at a gay sauna.

Despite the extreme nature of their crimes, only Strachan, a registered sex offender since the 1990s, was known to the police. The others were leading classic double-lives and used cunning to hide their sinister alter-egos.

Police say Strachan appeared to be a man who was rehabilitating himself and atoning for his past sins, while in reality he was a confidence trickster and deplorable liar.

In the end, however, Strachan's over-reaching swagger bound him in his own web of deceit, trapping the seven other abusers with him.