A paedophile prompted a large-scale evacuation in Essex when he attempted to kill himself by ‘cooking’ a bomb in his oven to avoid prison.

More than 300 residents were forced to flee their homes for eight hours after Ian Shingler called police to say he had explosives and was going to commit suicide.

Around 100 Met Police officers rushed to the paedophile’s top-floor flat in Rainham, Essex, to lock it down, after Shingler said he was planning to blow himself up because he was terrified of going to prison.

The 41-year-old aimed to blow himself up because he was terrified of going to prison after police found thousands of child sex abuse images on his computer, Basildon Crown Court heard.

When police raided his flat, they found the over door had been destroyed and the remains of a powerful homemade explosive device on a baking tray.

They also discovered a kilogram of a deadly white powder called TATP – also known as acetone peroxide, which was used in the 7/7 London bombings – in Shingler’s bedroom.

Tests revealed it was 82 percent pure and had been ordered over the internet.

Police also found an improvised explosive device, which Shingler had made by using a nine-volt battery, as well as a notepad of instructions on making homemade bombs and a suicide note, the court heard.

Shingler had previously been arrested in 2015 after police raided his flat, where they found thousands of indecent images of children. More than 4,150 pictures were found, 698 of which were ‘Category A’, the most graphic type, along with 66 films. Officers also recovered a Yahoo search for “pre-teen dominatrix.”

Shingler was jailed for nine years after admitting possession of ammunition and a firearm without a certificate, having an explosive substance under suspicious circumstances, and possessing indecent images of children.

His lawyer, Michael Morris, said he was of “good character” and that his only friend had been the internet.

Morris said Shingler alerted police after realising he was putting the whole estate in danger with the bomb.

“He immediately called the police because his intention was to take his own life and he did not want to cause damage or injure his neighbours. He didn’t really have a clue about what he was doing.”

But judge Jonathan Black stressed that the “seriousness” of Shingler’s activities outweighed his state of mind at the time.

“It seems to me that it is the seriousness of the offense that must take precedence in this case,” he said.