Robin Shellard, defending, said his client was a student and had made the foolish decision to get involved in the scheme to pay off his debts.

He said he had been persuaded by a friend of a friend to allow the house to be used by the other man, who planted and harvested the drugs and sold them.

“For the majority of his life he has led a law abiding and hard working existence. He has been in employment, done a number of courses and tried to better himself,” he said.

“His character reference from his godfather and pre-sentence report point to a number of difficulties he had at home.

“He was homeless at 16 and forced to live on his own wits and industry. Unlike so many young men he didn’t resort to crime. Now, at 29, he accepts knowingly and wittingly, he embarked on this growing of cannabis.

“It is described that he was persuaded to do something out of character in the character reference and backed up in the pre-sentence report.

“He is a young man with enormous amounts of potential and now sees the error of his ways. He accepts this was involvement for profit to pay off substantial debts he had accumulated to try and better himself.

“He was prevailed upon by someone far more sophisticated than he to take out the tenancy and allow the property to be fitted out with the requisite hydroponics system so the other person could harvest it and sell it at a profit.”

Urging the court to impose a suspended sentence he said: “Inherently Mr Thomas is a decent man who made an error of judgement.”

Jailing him, Judge Douglas Field said: “A full blown and up and running cannabis factory was established in these premises.

“The potential profit running in round figures is £40,000 to £120,00. No less than 144 plants, this is serious stuff Mr Thomas.

“In addition, nearly £11,000 of electricity was wrongfully abstracted. All this is so serious that I am not prepared to suspend the inevitable sentence of imprisonment.”

He also ordered the forfeiture and destruction of the drugs and equipment and the £2,020 found in the house when he was arrested.