House-to-house police enquiries in part of Blackpool led to the chance discovery of a cannabis farm in a flat.
Suspicions were aroused when a smell was noted coming from Darren Holt’s rented home on Queen’s Promenade.
And 24 plants were discovered inside the property.
A court heard they could have produced a yield of £4,580 of the drug.
Holt, 49, had pleaded guilty to an offence of producing cannabis.
The drugs find was made on September 23 last year.
Hanifa Patel, prosecuting at Preston Crown Court, said officers were conducting house-to-house enquiries on an unrelated matter when they arrived outside the defendant’s flat.
There was a smell of cannabis. Holt ran away from the building, but was caught.
Inside the flat there was a very strong smell. The plants were scattered throughout the three-roomed property.
It was thought they could have produced 800g of the drug.
Holt went on to accept growing the plants for about a month. He had been asked to grow them by a friend and also used cannabis himself.
He had refused to say who he was doing it for. The court was told that person had set up the operation and would pay for electricity costs.
He would later tell police he had been assaulted by the people he had not named.
Lucy Wright, defending, said his decision to get involved was linked to his using cannabis.
She told the court: “He agreed to grow these plants, to act as a gardener, looking after them on a daily basis.
“He wasn’t the person who set it up, but had the day-to-day conduct of it. This was an enterprise of madness.
“It arose out of a period when he was at a low ebb, having returned from Tenerife. He had found himself with no friends, employment or stable accommodation.
Holt, who stated he no longer used cannabis, was bailed to March 4 for further information to be gathered on the case.