A killer who shot five people dead in 1978 has been told he might never be released from a secure hospital after "an arsenal" of weapons was found at his home last year.
Ex-Broadmoor patient Harry Street, 70, admitted making an improvised explosive device as well as 50 homemade bullets.
He was caught with the bomb and three handguns at his Birmingham home.
At the city's crown court Mr Justice Blair sentenced Street to indefinite detention under the Mental Health Act.
He told Street, who entered guilty pleas ahead of his trial, it was necessary for the protection of the public he be subject to special restrictions which mean he may never be released.
West Midlands Police has started a serious case review but said there had been no trace of Street on its database. He was released in the mid-1990s.
In 1978 Street, then called Barry Williams, shot three neighbours and a couple who ran a filling station.
He admitted manslaughter on the grounds of diminished responsibility and was detained under mental health laws.
On Monday, the defendant, of Hazelville Road, Hall Green, admitted possessing the explosive device, and prosecutors accepted his not guilty pleas to four other charges.
He had already admitted three charges of possessing a prohibited firearm and a count of putting a neighbour in fear of violence between 2009 and 2013.
Sentencing, the judge said Street had begun to "become obsessed" with his neighbours from as early as 2007, and harboured delusions they were harassing him.
"This was similar behaviour to that which had preceded the terrible events of 26 October 1978," he said.
However, he added "paranoid or delusional thinking on the defendant's part was not detected at that time".
He ordered his sentencing remarks to be made available to anyone involved in Street's care in future.
"I do so to record the narrow margin by which the risk of a further tragedy was averted," he said.
"The effect of these orders is that the defendant may never be released."
Analysis by Phil Mackie, BBC News correspondent
More than 35 years after Harry Street was first detained indefinitely, some of the same people who'd been present at Stafford Crown Court were in the public gallery once again.
Jill Burkitt, now Jill Dudley, who saw her family killed in 1978 and was severely wounded, hugged the victim of the most recent campaign of intimidation, Warren Smith, as Street was taken down to the cells.
Both will want to know why someone who killed five people and wounded several others was allowed out of detention in 1994, able to change his identity and start offending again.
The serious case review will have to explain how the mental health trust charged with his care failed to recognise warnings and tell the police.
And it will need to reveal why there was no trace in West Midlands Police's records of Harry Street, and why it took so long for them to realise Street and Barry Williams were one and the same.
Det Ch Supt Kenny Bell of West Midlands Police said Street's previous identity only came to light after his harassment campaign "escalated" and a local officer made "extensive checks", which led to Street's GP.
Street moved several times after his release, and had spells in Shropshire, Kidderminster and Birmingham, he said.
The explosive device and firearms were found at his home when he was arrested in connection with the allegations of harassment.
Harry Street - a timeline
- 26 October 1978: Barry Williams begins a killing spree that leaves five dead and three others seriously injured
- March 1979: Williams detained in Broadmoor indefinitely after pleading guilty to manslaughter
- 1994: Williams released from secure detention and allowed to move back to the Midlands, where he changes his name to Harry Street
- 14 October 2013: Police investigating allegations of harassment find firearms and explosives
- 6 October 2014: On the opening day of his trial, Street admits possessing firearms and making a bomb
Prosecutor Michael Duck QC said: "The Crown takes the view that the interests of the protection of the public are adequately served by acceptance of the (four not guilty) pleas.
"It is quite apparent, and would have been the Crown's case, that this man commits offences of the utmost seriousness when he is mentally unwell.
"The overwhelming balance of medical opinion is that this is a significant problem that will take a very significant time to resolve, if it ever does."
Street, who is being treated at the high-security Ashworth Hospital on Merseyside, made the device between January and October last year.
He has admitted throwing items at neighbour Warren Smith's roof, banging on and drilling into walls late at night, making threats towards him and driving past his new address after he had moved out.
Mr Duck said police found several guns and the improvised explosive in a cupboard at his home.
He said officers also found a collection of home-made bullets, which Street had tested by firing them at an Argos catalogue.
"The results of that search were, in the context of this case, revealing and frightening," he said.
"Of course, having discovered those items, there was further investigation into Harry Street and the reality of him having been Barry Williams in 1978 then emerged."
Asked if it had ever been in contact with Street, Birmingham and Solihull Mental Health Trust said it could not comment on individual cases due its duty of confidentiality.
Former West Bromwich Labour MP Lord Snape, who wrote to the Home Office to air his constituents' concern at Street's original release, said the case "beggars belief".
He said he was told Street was "no longer deemed to be a danger to the public".
"It is surely a matter of concern that someone as dangerous as this was considered to be safe enough to be released in the first place," he said.