A young man who sold diazepam to undercover gardai was trying to do another man a favour, a court heard.
Muris Ziga (21) had been asked if he could source drugs for a friend of a friend and he "foolishly" decided to help.
He was caught selling diazepam to an undercover officer during a garda operation targeting low-level drug dealers in the Blanchardstown area.
Judge David McHugh ordered Ziga to donate €200 to Blanchardstown Hospice and said he would leave him without a conviction.
The judge said a conviction for selling drugs would damage the defendant's future and he accepted the incident occurred due to Ziga's "naivety".
Gda Sgt Walter Sweeney said Ziga approached an undercover garda at Blackcourt Road, Corduff, last July 10 and sold him two trays of diazepam worth €20.
The court heard Ziga had never been in trouble before.
Defence solicitor Simon Fleming said another individual rang Ziga and asked him if he could help him source drugs for a third man.
Mr Fleming said Ziga decided to help this man, in what was a "very foolish" and "unthinking act".
The solicitor said Ziga's family is originally from Bosnia, and he came to Ireland when he was eight-months-old.
Mr Fleming said Ziga comes from a working-class area where there is a high usage of drugs, and he would have been a casual cannabis smoker in the past.
He said the defendant did not think through the consequences of helping another individual to source drugs.
He added that Ziga's father died when he was young, and he lives with his mother and stepfather.
Mr Fleming also said that Ziga hoped to travel to Australia to work, and he asked the judge to leave him without a conviction.
The defendant, of Parlickstown Avenue, Mulhuddart, admitted before Blanchards-town District Court to possession of diazepam for sale or supply.
Ziga was one of more than 50 men and women arrested within a 24-hour period as part of a six-month garda investigation in response to growing public concern over drug misuse in a number of areas.
Operation Rhea was carried out in west Dublin, while operations were also conducted in Cavan and Port Laoise.