An offshore worker's cannabis farms were found when firefighters were called to a flat to deal with a flood.
Emergency services had been called to a property linked to Michael Parker at Marshall Wallis Road in South Shields, to deal with water pouring through the ceiling and found a 70-plant cannabis crop growing inside.
Newcastle Crown Court heard the police were alerted and found a similar-sized farm during a search at Parker's Oxford Avenue address in the town.
Prosecutor Mark Giuliani told the court the farms, which were found last September, were capable of producing up to £50,000 worth of skunk cannabis per year.
Parker, 45, of Oxford Avenue, South Shields, pleaded guilty to two charges of cultivating cannabis and possessing 66 packs of class c barbiturates found at the second property.
He pleaded guilty on the basis he would have kept some of the crops for his personal use and the rest would go towards paying off a debt he had built up with dealers.
Mr Recorder Richard Wright QC sentenced him to two years behind bars.
The judge told him: "At two separate addresses you had set up a sophisticated operation for the cultivation of cannabis that was both capable of producing significant amounts of cannabis and, had you done so, was capable of being a very profitable operation indeed."
The judge said he accepted Parker had no intention of selling the cannabis he produced but would have used it to pay the dealers what he owed.
But he added: "By setting up and running the operation you were fueling the drug trade in one way or another "If you are returning cannabis to drug dealers they are going to deal that
to other people.
"The fact is, you made a choice to set up these cannabis farms and you made a choice to grow cannabis in that way."
The court heard Parker had lost his job as an abseiler who tended to off-shore rigs due to an economic downturn and suffered a family tragedy when he built up a debt for his cannabis use.
Vic Laffey, defending, told the court: "Things got on top of him."
The court heard after his arrest last September, Parker had gone back to work and his personal circumstances had vastly improved.
Parker has a previous conviction for producing a class b drug in 2001, which landed him in jail for 28 days.