Andrew Ibrahim, a former public schoolboy who tried to blow up a shopping centre in Bristol, was turned in to police by officials at a local mosque in the first case of its kind, it can be disclosed.
Ibrahim, a Muslim convert who changed his first name to Isa, was found guilty on Friday of trying to launch a bomb attack using a homemade suicide vest.
He conducted a reconnaissance mission around the Broadmead Shopping Centre in central Bristol, using his mobile phone to take notes about how long it would take to get from one point to the next.
But instead of dumping explosives in the bins as originally planned, Ibrahim, began to be obsessed with the suicide videos of other bombers and made himself a cotton vest of the kind he had seen on the internet.
He also used the internet to teach himself how to make HMTD, the same substance used by the July 7 bombers, and his plan was only foiled in April last year when he arrived at a local mosque with burn marks on his hands and arms.
But police sources pointed to a series of missed opportunities by others to turn him in.
* A visiting lecturer at the City of Bristol College reported him to the college when he began asking questions about "the best" biological agents for killing people but the college did not take the matter further.
* Ibrahim bought up stocks of hydrogen peroxide Â a key ingredient of his bomb - at a number of Boots stores in Bristol and staff failed to follow their own regulations and alert the police.
* At the Maplins electrical shop, Ibrahim talked about a miniature lightbulb with the glass removed, a key indicator of a home-made detonator, but staff failed to realise what he wanted the equipment for.
* He talked to his friends about suicide bombing and even went to get ingredients for his bomb with them but they did not take him seriously.
A senior source at Avon and Somerset Police said a call was made to a Special Branch officer who works as a community engagement officer with the Counter-Terrorism Unit on the evening of Monday April 14 while he was on a narrow-boat holiday.
"The individual had talked about suicide bombing and they had challenged him on his views. They phoned us with his first name and said he was a convert but it took a few more days to work out who he was," the source said.
The Special Branch Officer called his sergeant back in Bristol who set about trying to track down the individual, known only as "Isa."
On the evening of Wednesday April 16 they were given a photograph of him and worked out his full name and address.
The next morning he was spotted by officers when he walked into his doctor's surgery in Prince Street, Bristol, and an armed response team was scrambled to the scene, arresting him at 1.40pm as he made his way into the centre of Bristol.
At his council flat in the suburb of Westbury-on-Trym, Bristol, police found explosives in a plastic family assortment biscuit box in the fridge along with ball bearings and airgun pellets and a home-made suicide vest hanging on the back of the bedroom door.
The area was evacuated as the bomb squad moved in to carry out a controlled explosion.
Detective Superintendent Nigel Rock, the senior investigating officer, said: "He was unknown to us, the first thing we knew about his device was from the Muslim community. All of Bristol should be grateful to them for providing information. Without a doubt they saved people from serious injury and worse."
Det Chief Supt Kevin Hazell, head of the South West Counter-Terrorism Intelligence Unit, said the case was a success for the government's Prevent strategy which has involved encouraging local mosques to understand the challenges of fighting terrorism and to challenge is extremist views.
Officials at the mosque, in central Bristol, told the Daily Telegraph it was a "sensitive subject" and they had decided not to comment.
Ibrahim, who had been expelled from several public schools in Bristol, had enough ingredients to make the equivalent of three hand grenades, explosives experts said, and he had successfully made the explosive at least once, recording his efforts on his mobile phone.
Ibrahim is thought to be one of the few examples of a "self-radicalising" terrorist who downloaded videos by the extremist preachers Abu Hamza and Omar Bakri Mohammed.
The following month Nicky Reilly, another Muslim convert walked into the Princesshay shopping centre in Exeter and tried to blow himself up. He is serving life in prison.