Convicted sex offender Neil Strachan will serve a minimum of 16 years and gay rights campaigner James Rennie a minimum of 13.

The judge said Strachan had a “sadistic and aggressive personality”.

Strachan, 41, was convicted of attempting to rape an 18-month-old boy in Edinburgh on New Year’s Eve in 2005.

Rennie, 38, the former boss of LGBT Youth Scotland, an organisation dedicated to helping young lesbian, gay, bisexual and transgender people, was found guilty of molesting a young boy over more than four years, beginning when the boy was aged just three months.

The pair, both from Edinburgh, were also convicted, alongside six other men, of a catalogue of child porn charges after a 10-week trial ending in May.

And they were found guilty of conspiring to abuse children, as were three other members of the network.

The men were snared by one of the most complex and challenging inquiries carried out by Scots police.

They were traced through their explicit internet chats about sexual fantasies involving children.

In total, nearly 125,000 indecent images were seized during Operation Algebra.

Ross Webber, 27, from North Berwick; Craig Boath, 24, from Dundee; Colin Slaven, 24, from Edinburgh; and John Milligan, 40, Neil Campbell, 46, and John Murphy, 44, all from Glasgow, were sentenced in June for their involvement in the paedophile ring.

Civil servant Milligan received the longest jail sentence of 17 years.

Insurance worker Boath was jailed for nine years and nine months, while bank teller Webber was jailed for eight years and nine months.

All three were convicted of plotting to participate in the sexual abuse of children, as well as child porn charges.

IT worker Slaven was jailed for three years.

Cake firm manager Campbell was ordered to spend three years and four months behind bars, while Murphy, a receptionist in a sauna, was jailed for two years.

The men at the centre of the international paedophile network led sordid double lives.

Neil Strachan and James Rennie held down good jobs and were trusted members of the communities in which they lived and worked.

But the pair shared a secret interest in young boys and had amassed a collection of some of the vilest child abuse images ever seen by police experts.

They were also responsible for the abuse of very young children.

Paint firm engineer Strachan, 41, who hid a dark past, sparked Operation Algebra when he left indecent images of children on a computer he sent for repair.

Tests revealed “sinister” emails between him and Rennie.

They had encountered each other online in 2004 when Strachan congratulated Rennie on the content of his web page on a site known to have been misused by paedophiles.

When the case came to trial, what the jury did not know was that Strachan had offended before.

He was 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 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, despite being one of the worst offenders in the group, was the only one of the eight men on trial this year who denied every charge against him.

Prosecutors were forced to piece together the case against him bit by bit.

Crucial to their case was a photograph partially showing a man sexually assaulting a young child.

The Crown called on a world-renowned expert in human anatomy to examine the picture, known in court as The Hogmanay Image.

Pinpointing the abuser’s physical traits, including a distinctive thumbnail, Professor Susan Black said there was “strong evidence” that Strachan and the man in the picture were the same person.

Rennie, 38, was the successful chief executive of LGBT Youth Scotland, where he was a confidante to teenagers and a champion of gay rights.

A former secondary school teacher, he regularly spoke out in public on gay issues, particularly how they affected young people.

But the High Court in Edinburgh heard he was “polluted by deviant compulsion”.

Crown QC Dorothy Bain said: “In reality he is someone who allowed his profound interest in the sexual abuse of children to engulf his entire life.”

The extent of his obsession with under-age sex unfolded as the 10-week trial progressed.

He was charged and ultimately convicted of molesting a child over a number of years, starting at the age of three months.

And in an online conversation with another accused, he even expressed a wish to see children with Down’s Syndrome or a learning disability sexually abused.

Operation Algebra officers found that Rennie had links with paedophiles in the US and the Netherlands.

Rennie was traced and arrested by police at the end of 2007.

He was suspended from his high-profile post and by February 2008 had resigned.

LGBT Youth Scotland condemned Rennie’s betrayal, saying: “We are appalled by the abuse and exploitation of children by James Rennie, and wholeheartedly welcome his conviction.

“We had no suspicion whatsoever of the crimes James Rennie was committing. He was obviously skilled at hiding his actions and adept at deceiving people.

“It is with a particular sense of betrayal of our organisational purpose and values that we learned of the crimes committed by James Rennie.”

Paedophile gang leaders sentenced to life in jail