A man who repeatedly raped an 11-year-old girl and tried to rape a three-year-old, then claimed the internet corrupted him, has been jailed for eight years.

David Leggatt, 59, who also admitted possessing almost 120,000 indecent photographs and videos of young girls was yesterday ordered to be monitored in the community for three years after his release from prison.

Judge Lord Bracadale told Leggatt that but for his plea of guilty he would have been jailed for 12 years.

Leggatt, of Dunfermline, Fife, pled guilty to raping the 11-year-old and taking photos of the abuse. He also admitted sexually assaulting and attempting to rape another girl.

Advocate depute Gillian Wade, prosecuting, told the court that police went to Leggatt's home on August 3, after receiving confidential information that someone was "heavily involved" in downloading indecent images of children.

Officers from Fife Constabulary were granted a search warrant and Leggatt took them upstairs and showed them his computer equipment. He explained his computer and hard drive in the loft contained images of children. He also confessed that he "interfered" with girls.

The court heard how one of the girls told police during an interview that Leggatt would promise her whatever she wanted in return for sex acts.

The advocate depute said: "All through this, the accused would tell her not to tell anyone or he would go to prison and he didn't want to go to prison.

"She was always scared of what he was going to do."

The court was told that Leggatt tried to kill himself in prison and was only saved by the quick-thinking of his cell mate.