Two hooded men hired a taxi for a late night raid on a pub - and were trapped by the brightly lit sign on the cab roof.
It was spotted after a relief supervisor was woken when the burglar alarm went off at 4.20am on February 1, a court heard.
She heard banging downstairs in the Admiral Rodney pub, and looked out of an upstairs window to see the pair walking away through Wollaton.
The worker then noticed a car parked outside the community centre on Bramcote Lane, realising it was a taxi because she could read the company name on its illuminated sign.
"Two males got in and the vehicle drove off," said Chloe Griggs, prosecuting. Police were alerted and an officer soon saw the silver Toyota with the taxi sign.
When the vehicle halted on Chesil Avenue, two men got out of the back seats, ran off and one vanished. But jobless Corey Graley was detained after being chased across a patch of grass, dropping bottles on the way.
"Suddenly the male stopped, turned directly towards the officer and clenched his fist. The officer sprayed him with CS gas," said Miss Griggs.
By this time the pub worker had checked her premises. Miss Griggs said: "She went down and found a window had been smashed in the kitchen. A box from the fruit machine was on the floor and she estimates £350 was taken.
"Numerous bottles of wine and spirits were missing."
Graley, 45, pleaded guilty to burglary of the pub and was put on probation for a year, with six months spent trying to end drug problems. He must pay £400 compensation to the pub and a government surcharge of £85.
Deputy District Judge James Davis told him that he would have to undergo regular drug tests to show he is tackling that trouble. Graley told him: "I will do my best."
Tim Holder, mitigating, said the raid had been no benefit to Graley, of Wigman Road, Bilborough.
"He didn't receive any money and he dropped bottles of alcohol when he was caught," Mr Holder said at Nottingham Magistrates' Court.
He said Graley had an addiction to mamba and cocaine last year but added: "His partner is his saving grace. She doesn't suffer fools gladly and she steers him in the right direction."
A probation officer said Graley suffers from depression and was not suitable to carry out unpaid community work because of his "substance misuse." But he could benefit from going on a "one-to-one" programme to combat his drug problem.
Nobody else has been charged with involvement in the pub raid.