West Yorkshire officers executed a search warrant at the Brooksmouth Mill premises on Clifton Road in October and had to force entry through a roller shutter and a wooden door.
Prosecutor Camille Morland told Bradford Crown Court today (Thursday) that there were even CCTV cameras trained on the entrance to the large building which meant those inside could try to escape when the police arrived.
The court heard that one male did manage to get away, discarding his white boiler suit, but 35-year-old Gjin Leraj, who was wearing a similar outfit, was detained near the river at the back of the mill.
Police found 38-year-old Myslim Istrefi hiding by the rear door.
Miss Morland said the sophisticated set up covered five growing rooms with living accommodation in another part of the building.
Leraj admitted being at the premises for two months and said he was not allowed to leave while Istrefi said he had only arrived there the day before after being told he was going to be doing some decorating work for a wedding.
Both men admitted watering and looking after the 889 cannabis plants which were in various stages of growth.
Miss Morland said the cannabis farm was equipped with lights and ventilation and the electricity meter had been bypassed.
“There were also numerous root balls from previous crops which were being broken up by using a pick axe,” she said.
She said the plants could have resulted in a cannabis yield of more than 90 kilograms which, if sold in one-gramme street deals, would have been worth up to £933,000.
Both Leraj and Istrefi pleaded guilty to a charge of cannabis production and said they needed to pay off loan sharks and debts back in their native Albania.
Judge Neil Davey QC said criminals had taken over the mill building to grow cannabis and the pair had been employed to look after the plants.
He noted that the men were of previous good character and said: "I have no doubt that to a certain extent both of you were exploited by reason of your personal circumstances.”
Both men were sentenced to 15 months in prison, suspended for 12 months, after the judge said there was a realistic prospect of rehabilitation in their cases.