A 27-year-old paedophile continued his vile crimes by downloading photos of child abuse while attending a program meant to stop his sick fantasies.

Matthew Prescott was earlier caught with more than 4,000 images of child abuse, but he avoided prison and was instead instructed to take rehabilitation sessions. But then he carried on offending, reported Liverpool Echo.

Last week, a judge called him "dangerous," and he was locked up after his sick obsession was revealed by two more investigations.

Five years ago, he was convicted of three counts of downloading and one count of possessing indecent images of kids. At the Liverpool Crown Court, he was told to comply with a five-year Sexual Harm Prevention Order, and was given a three-year community order.

Last summer, police found almost 2,000 more photos and videos at his home in St Helens, England. There were 240 files classed as Category A -- the most severe, and which included a photo of an infant. It was also found that Prescott continued to have access to illicit images as early as September 2016 despite the sexual harm prevention orders and being under the restrictions of the community.

The judge said, "You are a prolific paedophile and, not withstanding the previous orders, you continued unabated in your deepest and darkest fantasies."

Prescott had apparently "duped" authorities who were keeping an eye on his progression.

After he was held in June last year, he kept engaging with photos of child abuse. In April, his home was raided by cops who got hold of a laptop that had various images of child abuse. He had also been virtually talking to other paedophiles.

The judge, who sentenced him to 30 months in jail and handed him a lifelong Sexual Harm Prevention Order, said, "Describing categories in the way that the court is required to do simply cannot ever do justice to the true horror of the images that you have been viewing unabated for years."

Prescott told a psychiatrist that his latest collection of sickening video and photos was not his responsibility, but that of Alex (his alter-ego), who is one of five personalities the 27-year-old said took over him, reported Daily Mail. He claimed that he tried to get rid of him several times.

Dr Lucy Bacon had earlier said that she had diagnosed him with emotionally unstable personality disorder.

Representation Image Toddler Boy by the lake qimono/ Pixabay