A 26-year-old man has been charged in connection with a drug seizure in Dublin after he allegedly threw a bag of heroin out of his apartment window.

Gardaí discovered two guns along with heroin and cannabis plants during a search at Palmerston Hall, Dominick Street, Dublin 7, on Thursday evening.

Two men were arrested at the time and detained at Mountjoy Garda Station.

Father-of-two Lewis Davis, with an address at Palmerston Hall, was brought before Judge Bryan Smyth at Dublin District Court today.

He was charged with possessing heroin and having it for the sale or supply at his apartment and he could face further charges in relation to guns and cannabis allegedly found in his home.

Garda Caroline Purcell told Judge Smyth the accused made no reply when charged. Objecting to bail, she cited the seriousness of the case.

Garda Purcell said a rifle and a pistol, as well as ammunition, were also found in the property. They have yet to be analysed by the Garda ballistic section.

A number of phones were also seized, she said.

Garda Purcell told the court it was likely further charges will be brought in relation to the cannabis and the firearms.

Pleading for bail, Michael Kelleher said his client risked losing his home if he went into custody.

The solicitor said Mr Davis had spent eight or nine years in the homeless system. Last December he got accommodation which was a "game changer" for him.

Judge Smyth set bail in his own bond of €500 but required an independent surety of €6,000 of which half must be lodged.

Mr Davis, who has not yet indicated how he will plead, was remanded in custody with consent to bail to appear at Cloverhill District Court on Friday.

A 32-year-old man, who was also arrested, was released by gardaí on Saturday and a file will be prepared for the Director of Public Prosecutions.