Police carrying out a bail condition check on a Douglas man discovered his flat full of people smoking cannabis.
David Nicholas Callow, of Belmont Terrace, appeared before High Bailiff Michael Moyle charged with possessing and cultivating cannabis and allowing his premises to be used for taking drugs.
The 23-year-old was on bail when police called to see him at 11.15pm on October 4, to make sure he was obeying his bail conditions.
Their suspicions were aroused when they smelt cannabis inside.
Rosemary Burnett, prosecuting, told the court a search of the flat revealed numerous pieces of cannabis, although she was unable to give a weight for the drugs found.
Officers also discovered a cannabis plant which had been hidden inside a cupboard.
Callow's advocate said he accepted the matter had been made more serious because he was on bail to another court at the time.
He said his client was very sorry and agreed he had been very stupid.
Mr Moyle jailed him for five months.

Researching your Manx family history can be a very interesting and rewarding hobby. Trace your roots in the Isle of Man with our helpful of guide.