Officers seized over 500 cannabis plants with an estimated street value of around £500,000 when they searched two properties in Firth Road last month.
Bradford Crown Court heard today how 27-year-old Ervis Roci was eventually found hiding in a space inside the chimney breast of number six.
Prosecutor Clare Walsh said when officers first entered the property it appeared to be unoccupied, but there was a hot drink left in the living room and a mobile phone was plugged in charging.
As police searched the house they found a suspicious gap in the party wall in the loft giving access into number eight.
When the next door house was searched officers arrested Edi Kotorri, also 27, from the living room.
Miss Walsh said number six had more than 350 cannabis plants growing in the basement and three bedrooms and they were valued at between between £300,000 and £350,000.
Next door the house contained more than 180 plants valued at around £180,000.
Both men, who had come into this country illegally, pleaded guilty to producing cannabis when they made their first appearance before the magistrates court.
Jailing the pair Judge David Hatton QC said:”You were involved in the production of cannabis in separate properties, but in each property there was being grown a considerable amount of cannabis.”
He said each man had sole responsibility for keeping the plants alive, but he accepted their involvement in the operation had not lasted a great length of time.
Both men will now face deportation back to Albania after serving their jail sentences.