A Dublin man refused to let gardaí into a house after they responded to an anonymous call that another man had been outside shooting a pellet gun "at demons".
Joseph Markey (38) insisted gardaí needed a warrant to come in and speak to his friend who lived there, despite being told they were there out of concern for the man's safety.
Markey said he was trying to protect his friend.
Judge Bryan Smyth said Markey was not entitled to refuse the gardaí entry because he did not live in the house.
He found him guilty of garda obstruction, but applied the Probation Act, leaving him without a conviction.
Markey, of Berryfield Road in Finglas pleaded not guilty to garda obstruction.
Garda David Biggins told Dublin District Court he was called to a house at St Attracta Road, Cabra at 4.45pm on August 31.
An anonymous call had been received that a man was outside the house shooting a pellet gun at what was noted in the call as "demons".
There were concerns in relation to a resident who was known to have mental health issues and may have been a danger to himself. When Markey answered the door the garda was concerned there may be a "preservation of life issue" and explained this four or five times, but Markey said: "You need a search warrant."
The garda asked if the resident could come to the door but Markey said the man was not present.