A man who allegedly stored more than €5,000 worth of sedative tablets at the home of a relative handed himself in to gardaí when she was arrested, a court heard.
Cian Fay (23) went to the station after his "traumatised" relative told gardaí she knew nothing about the diazepam found in a search at her address.
Judge Bryan Smyth granted Mr Fay bail despite garda objections and adjourned the case at Dublin District Court.
Mr Fay, of Empress Place in the north inner city, is charged with possession of diazepam with intent to sell or supply at an address at nearby James Larkin House on August 31.
Objecting to bail, the prosecuting garda said a search was carried out at the address and a relation of Mr Fay was arrested on suspicion of possession of the drugs.
Fay made his way to Store Street Garda Station when he heard his relative was in custody. He told gardaí the items belonged to him.
Notwithstanding this, Mr Fay still enjoyed a presumption of innocence, his solicitor Tony Collier said.
The garda said he believed the accused would commit offences if granted bail, but Mr Collier said: "You are predicting the future, I don't think the Bail Act goes that far."
He said his client had been "cooperative and proactive" in going to gardaí himself.
"It's rare that people would come into a garda station and fess up to something uninvited, isn't it?" Mr Collier said.
The garda said he believed the only reason the accused presented himself at the garda station was because his relative was in custody.
"She has never been in trouble before, she has a couple of kids, she was upset and traumatised," the garda said.
The woman told gardaí she knew nothing about the drugs.
The accused had turned up at the station with no coercion, Mr Collier said.
Judge Smyth said the value of the seizure "isn't insignificant", which put the case in a more serious category. Mr Collier said it was "not an enormous amount".
Bail was granted on certain conditions.