JOSHUA Bowman's ears were ringing.
The 28-year-old had been sitting in a car at Denman when the gun he was reloading on his lap "went off" and he "shot something accidentally".
Fortunately for Mr Bowman he survived the shooting unscathed.
Unfortunately, when he called a mate to tell him the story the police were listening.
Police had been intercepting Mr Bowman's calls in the wake of an ongoing dispute with his neighbour that included Mr Bowman allegedly breaking into the man's home while armed with a machete to intimidate him and throwing a Molotov cocktail at his car.
The listening device had already allegedly picked up Mr Bowman supplying small quantities of drugs, but now he had been recorded allegedly admitting to discharging a loaded firearm in a public place.
Details of the allegations against Mr Bowman - including that he stole a trailer of diesel fuel worth $37,000 and possessed homemade guns - were revealed in NSW Supreme Court on Thursday afternoon as Mr Bowman made a successful application to be released on bail to enter a 12-month residential rehabilitation program.
"Problematically, he was also recorded telling a friend that he had just shot something accidentally," Justice Natalie Adams said, summarising the intercepted phone call. "That his ears were ringing and that he was going to shoot his neighbour. It had happened by accident and it was on his lap and he was trying to reload it when it went off."
Justice Adams said despite the seriousness of the offences and the strong prosecution case, the fact Mr Bowman was able to obtain a bed in a residential rehabilitation centre - a rarity for those charged with firearm offences - meant he had overcome the "show cause" hurdle in seeking bail.
Justice Adams said there was a risk of Mr Bowman committing further offences if he left the rehabilitation centre, but his desire to get help for his long-standing drug addiction appeared genuine.
He was granted bail to reside at the rehabilitation centre in North Richmond for the next 12 months and the court heard he could still spend more time behind bars once the program ends.
Mr Bowman has not entered any pleas to 17 charges and will next appear in Newcastle Local Court next week.