A 32-year-old man has been refused bail after gardai uncovered a fully loaded semi-automatic pistol "ready for use" during a house search in Ballyfermot.
Garda National Drugs and Organised Crime Bureau (GNDOCB) detectives went to the home of Patrick Graham at Landen Road on Saturday.
The father of one was arrested inside the property and charged with two offences under the Firearms Act for unlawful possession of a Walther PPQ pistol and a magazine with 13 rounds of 9 mm ammunition.
He appeared before Judge Paula Murphy at Dublin District Court on Monday.
Detective Garda Donal Donoghue told the court that Mr Graham made no reply when charged.
Objecting to bail, he cited the seriousness of the case and said it could carry a possible 14-year sentence. He told Judge Murphy that the accused was in the sitting room downstairs when gardai arrived.
However, the pistol was lying on a bed, wrapped in a white T-shirt and covered with a grey hoody in an upstairs room.
Detective Garda Donoghue said the gun had "a loaded magazine inserted, and it was ready for use".
Questioned by defence solicitor Aonghus McCarthy, he agreed the accused made no admissions, denied knowledge of the gun, and there was no DNA evidence.
The officer said a preliminary assessment by the Garda ballistics section confirmed it was a firearm.
Pleading for bail, Mr McCarthy implored the judge to release his client with conditions. The solicitor described the case against his client as weak.
He disputed evidence that his client was caught red-handed and cited case law about firearms prosecutions withdrawn when it was impossible to establish who had the weapon.
He stressed his client denied the allegation and was not in physical possession of the gun. Mr McCarthy said there was no evidence Mr Graham knew about or was in constructive possession of the firearm.
Asked by the judge to respond to those submissions, Detective Garda Donoghue said there were three bedrooms, one used by another person and a second one where they found the gun.
He alleged that the weapon and Mr Graham's passport were in the second bedroom.
He added that the third bedroom was used as a storage room.
Judge Murphy refused bail and remanded Mr Graham in custody to appear at Cloverhill District Court on Thursday.
She noted he did not have significant means and granted him legal aid.
A second person arrested at the house was released without charge.
Reporting by Tom Tuite