Confidential information received by gardaí led them to search a house in Castlebar where they found €254 worth of cannabis.
The discovery brought Alan Millikan, 74 Lakeview, before the local district court on Wednesday, charged with possession of cannabis for the purpose of sale or supply.
Detective Garda William Grant told the court the search was carried out on December 13 last.
Mr Millikan admitted the cannabis belonged to him and three friends.
He and his friends would chip in together to buy cannabis in a larger quantity and then divide it out among themselves. This is how the supply charge arose.
There was no suggestion that they were selling it to anyone else, said solicitor for Millikan, Tom Walsh.
Mr Walsh said that since the detection his client has changed his way significantly.
He no longer uses drugs, alcohol or smokes.
“He is anxious to put this all behind him,” said Mr Walsh.
Judge Deirdre Gearty said she would strike the matter out if Mr Millikan paid €500 to Mayo Mountain Rescue by the December 17 court sitting.