Nicky Reilly suffered facial injuries in the failed attack
A Muslim convert has been jailed for life and must serve a minimum of 18 years after launching a failed suicide bomb attack on a restaurant in Devon.
Nicky Reilly, 22, was the only person injured when he accidentally set off his home-made nail-bomb in a toilet of Exeter's Giraffe restaurant last May.
He later admitted attempted murder and preparing an act of terrorism.
Police believe the Plymouth man, who has learning difficulties, was encouraged by extremists in Pakistan.
Officers are in contact with authorities in the country via the British Embassy in a bid to trace those who contacted him, Devon and Cornwall Police confirmed.
Sentencing him at the Old Bailey, Mr Justice Calvert-Smith said it was "sheer luck or chance that [the bombing] did not succeed in its objectives".
"The offence of attempted murder is aggravated by the fact that it was long-planned, that it had multiple intended victims and was intended to terrorise the population of this country," he added.
Unfortunately those who attempt to commit suicide and in doing so murder other people are almost invariably unsophisticated in many aspects
Mr Justice Calvert-Smith
Reilly had been preparing to detonate three bombs, created using glass bottles and containing about 500 nails, caustic soda and kerosene, when one exploded in his hands.
Dozens of customers and staff fled the restaurant in panic, but no-one else was injured.
Home Secretary Jacqui Smith said: "This case demonstrates that the threat to the UK from violent extremists remains real and serious.
"We need to work together to prevent people, especially young people, getting drawn into illegal activities."
Reilly - who converted to Islam between 2002 and 2003 - had admitted the charges last October, but sentencing was delayed to allow doctors to assess his mental state.
He has learning difficulties and Asperger's Syndrome, struggled to make friends and is thought to have a mental age of 10.
Friday's hearing was briefly adjourned earlier as Reilly's mother Kim broke down in tears in the public gallery.
The court was told she had first taken her son to see a psychiatrist at the age of nine, reporting obsessive behaviour and temper tantrums. He felt rejected by his father and later began to self-harm, taking an overdose at the age of 16.
Reilly came from a "loving and fairly normal family unit" but was "seduced" by a cause he "wrongly and almost fatally interpreted and probably never understood", said the judge.
While accepting the attack was "unsophisticated", he added: "There is no dispute but that this defendant currently represents a significant risk of serious harm to the public."
But he added: "Unfortunately those who attempt to commit suicide and in doing so murder other people are almost invariably unsophisticated in many aspects.
"That lack of sophistication saved many Londoners [in a series of failed bomb attacks] on 21 July 2005."
CCTV footage of Nicky Reilly buying nails
Devon and Cornwall Police initially said Reilly - who had changed his name to Mohammad Rashid Saeed Alim - had been "preyed on, radicalised and taken advantage of".
However, after Friday's hearing, the force's Assistant Chief Constable Debbie Simpson said that while he was "encouraged" by literature and individuals via the internet, Reilly was "self-radicalised".
"He acted alone, he clearly had vulnerabilities around Asperger's Syndrome but we would say he was not radicalised and acted under his own steam.
"We believe there is an association in Pakistan. It remains a live investigation and we are not in a position to confirm the details," she added.
Officers have already travelled to Pakistan in search of two unidentified people who contacted Reilly via an extremist website. The investigation has involved some 500 police staff.
Before sentencing, Kim Reilly told BBC News that her son was "very remorseful".
"He's sorry to the people of Exeter and those in the cafe that day."
Prior to his failed suicide bombing, Reilly left a note saying: "I have not been brainwashed or indoctrinated. I am not insane."
Reilly claimed he was simply doing "what God wants from his mujahideen".
"Everywhere Muslims are suffering at the hands of Britain, Israel and America. We are sick of taking all the brutality from you," he wrote.
The note attacked drunkenness and sexual immorality as "unacceptable to Allah and the true religion Islam".
Defence barrister Kerim Fuad described his client as the least sophisticated person to have been charged with terrorism.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.