A man who turned his rented Wells city centre flat into a cannabis factory capable of producing thousands of pounds worth of the drug has been jailed for three years.
The "sophisticated set-up" was discovered when police carried out a search in Priory Road on December 11 last year.
The first-floor flat above an estate agency and former post office belongs to Wells City Council and is leased to a local businessman. It was rented from him by 45-year-old Paul Fox who used a false name.
Fox was in the lounge when police burst in, Taunton Crown Court was told.
They found 600 cannabis cuttings weighing 3.15 kilos and with a street value of over £23,000 in the process of being dried, and there were also 60 juvenile plants growing there with a potential yield of 2.7 kilos worth over £19,000, said William Hunter, prosecuting.
Fox was arrested and admitted growing cannabis for his own use.
An expert estimated there was enough to last a heavy smoker about 11 years.
Mr Hunter said: "It was clearly a commercial production and crops were being grown in rotation.
"It was a professional setup. He said he was the only person responsible and no one else had access to his flat."
Fox, who had two previous convictions for possessing cannabis in the 1990s, was also in possession of 0.49 grams of cocaine.
Harry Ahuja, defending, said the prosecution's figures were based on valuations in 2000 and the cannabis was now worth about £19,000.
Fox had decided to sell the lot in bulk for about £5,000 to clear "spiralling" debts including the cost of setting up the production and the electricity bill. He was not selling small amounts to make a profit. He had been out of trouble since 1998 and had "issues" with cannabis for 20 years.
He said Fox was now living in Kidderminster and had taken over running a relative's building business, which was doing very well. He was well regarded and highly thought of.
His third wife, a Thai national whom he had known for two years, was now four months pregnant. He had eight biological children and a number of stepchildren and was under no illusion his future was in the balance.
It was the first time Fox had grown cannabis and it was intended for his own use but had spiralled out of control into a large quantity which he had to sell on.
Mr Ahuja asked for a community order with drug rehabilitation and said the court could be confident he would not re-offend.
Recorder Jonathan Fuller QC said Fox had pleaded guilty to possessing a small amount of cocaine and being concerned in the production of cannabis.
Police had found three tents inside his flat and the cannabis operation was clearly financial with plants being grown in rotation.
Mr Fuller told Fox: "You had arranged it under a false name and your initial intention had been to sell the cannabis in order to alleviate your debts and have cannabis for yourself. There were several thousand pounds worth of costs involved and you were clearly planning on a further harvest."
Jailing Fox for three years, the judge said: "The pre-sentence report and character references say you are a hard-working family man and this degree of criminal conduct is out of character. I would be failing in my duty if I did not pass a custodial sentence."