A former Royal Marine Commando caught with a pipe bomb in his flat and equipment to make nine more is back behind bars.
Allan Peach stored the improvised explosive device (IED) in a safe at his home in Dundee.
His block of flats had to be evacuated as army bomb disposal experts were called in.
A judge heard 19 cans of CS gas were also discovered, which Peach had been selling for up to £90.
The 30 year-old later told police: “I’m not a bad man. I’m just trying to make ends meet.”
Peach yesterday appeared at the High Court in Glasgow where he pled guilty to possessing an improvised explosive device and materials with intent to endanger life or cause serious injury.
Peach admitted a further charge of having a quantity of CS spray.
He was previously jailed for three years at the same court in 2012 after causing a blast when he stuffed a hair gel tub with explosives at a tenement in Dundee.
Peach now faces another jail term when he is sentenced later this month.
Police had swooped on the ex-marine’s home last September, with officers initially discovering a box containing cans of CS gas.
Peach went on to hand over a set of keys for a safe.
Prosecutor Bill McVicar: “On opening it, police observed what appeared to be an improvised explosive device.
“It had been manufactured from a copper pipe with end caps attached and a fuse at one end.”
Nearby homes were evacuated and a 100 metre exclusion zone set up amid fears of potential danger.
The device was made safe before being analysed by experts.
The substance inside was found to be a mixture of powders indicating the pipe bomb was a “poorly made low explosive”.
It had been constructed with brass fittings normally used by plumbers and a “pyrotechnic fuse” had been attached.
Mr McVicar added: ‘It is unlikely, therefore, that the IED would function as expected,” but the prosector went on to say that Peach had “sufficient material” to “make a further nine pipe bombs”.
He told the court: “It is possible that even such poorly made low explosives could have functioned either partially or entirely.”
Peach did not have legal permission to have the CS spray.
Mr McVicar said: “He advertised the cans for sale. The prices were £60 for smaller canisters and £90 for larger ones.”
His mobile phone revealed photos of the canisters laid out in his home.
The court heard Peach had latterly been studying agricultural architecture at college in Dundee.
He told police he had been a former marine and was suffering from a number of personal issues.
Mr McVicar said: “He became tearful and referred to going to prison, maybe for longer this time.”
Judge Lord Clark remanded him in custody as sentencing was deferred for reports.