A man who told gardai he had been shot in the face by three men wearing balaclavas had in fact shot himself, a court heard.
Darren Nolan (27) made up the story after his mother told gardai she doubted his story.
When searching his bedroom after the alleged incident, gardai found a handgun as well as more than €16,000 worth of illegal drugs.
Nolan, of Shangan Green, Ballymun, pleaded guilty at Dublin Circuit Criminal Court to recklessly discharging a firearm and being in possession of heroin and cocaine for sale or supply on May 8, 2018.
He also admitted making a false statement to gardai at the Mater Hospital on the same day.
Nolan had four previous convictions for road traffic offences, including drink-driving.
A garda told Michael Hourigan, prosecuting, that officers received a report of the accused having been shot in the face.
They arrived at his address at 3am to discover him in the front garden with a wound to his left cheek.
Nolan told gardai he had been shot by three young men wearing balaclavas.
Gardai began a search of the area and went to inform Nolan's mother of the incident, only to be told by her that she believed he had caused the injury himself.
Gardai searched Nolan's bedroom, where they found blood on the floor and a handgun in a drawer.
They also found heroin with a value of €15,537 and cocaine worth €933.
When questioned in hospital, Nolan again told gardai he had been attacked, but accepted responsibility for shooting himself when interviewed in a garda station the following day.
He said he had drunk a bottle of whiskey and a "shoulder" of vodka leading up to the incident.
The accused told gardai his mother did not want him to drink spirits, and this had caused arguments.
During one row, he said he would shoot himself, which his mother did not take seriously as she did not know he had a gun.
Nolan said he went to his bedroom and took out his gun, which he had bought online using Bitcoin and could fire only blanks and flares.
He raised the gun to his cheek and shot himself with a blank.
The garda agreed with James Dwyer, defending, that his client had agreed to hold the drugs for another person.
He agreed Nolan had told gardai he made up the story about being shot because he "did not want people to think he is a lunatic".
Judge Karen O'Connor ordered a probation report and adjourned the matter to October 30.