A man who threatened to blow up a filling station put a petrol pump hose around his neck and flicked a cigarette lighter, a court heard.
Jaroslaw Gredka (36) then changed his mind and tried to run away.
But staff and customers wrestled him to the ground on the forecourt of the Tesco petrol station, in Fosse Road North, Leicester.
The city's crown court heard Gredka had earlier behaved bizarrely at the petrol station shop, telling a security guard he had a bomb strapped to his body.
The worse for drink, Gredka then pulled up his clothing to show there was no bomb.
The father-of-two started acting strangely after suffering a serious head injury at work, three weeks before the petrol station incident.
He suffered a gash needing 17 stitches. The bang on his head had also made him mentally ill at the time of the offence, according to a psychiatric report.
Gredka, described as a hard-working family man with no previous convictions, admitted threatening to destroy or damage property by fire on July 21.
He was sentenced to a two-year community order with supervision and a requirement to attend a 20-day education, training and employment programme.
Sentencing him, Judge Simon Hammond said: "If it wasn't for the psychiatric report, he would have got two years.
"It's not in the public interest to send this man to prison because he's ill and needs help.
"He was mentally ill and he wasn't himself. He also attempted suicide and is very vulnerable and fragile."
The court heard Gredka, of Pool Road, Dane Hills, Leicester, went to the shop at the filling station the worse for drink and, when refused service, left, swearing.
He returned at 11pm and mentioned to a security guard he had a bomb, but he was not taken seriously.
Gredka began demanding the police be called and threw some items around in the shop.
He claimed to have domestic problems, saying his partner had left him – when, in fact, their relationship was fine and she was visiting relatives in Poland.
Alan Murphy, prosecuting, said: "He said he was going to torch a petrol pump."
The staff turned off the fuel supply to the pumps, switched all the lights off and alerted the police.
"He ran to one of the pumps and wrapped the hose around his neck," said Mr Murphy.
"He held a lighter one or two feet from the nozzle and began squeezing the handle and threatened to ignite the petrol.
"He started to flick the ignition on the lighter."
The incident lasted about 10 minutes.
Gredka made full admissions to the police, accepting he might have threatened to "blow up the petrol station".
Philip Gibbs, mitigating, said he was unused to drinking and had consumed some with a friend. "He was acting in an extremely odd way," said Mr Gibbs.
"Until the accident at work, he has been a decent, honest citizen of Europe."
On that day, he had locked himself out of his home and car and wanted to get help.
Mr Gibbs said: "He was in an altered mental state and his mind began to play tricks.
"He was suffering from concussion syndrome and he is voluntarily having therapy.
"He's on medication."