Cops discovered an underground cannabis factory constructed out of five shipping containers buried beneath a barn, a court heard.

Daniel Palmer, 40, of Hatherleigh, in Devon, England, was found guilty of producing cannabis after a trial at Exeter Crown Court, the BBC reports.

The entrance to the site, which is obscured by woodland, was hidden beneath farm machinery and sacks of fertiliser.

Officers also found more than a kilogram of skunk cannabis in large water containers, the court heard.

Prosecutor Lee Bremridge said: “It goes without saying that the excavation work to dig out and remove enough soil to sink five shipping containers and build a barn on top of them must have been huge.

Officers also found more than a kilogram of skunk cannabis

“The value of what it could have produced would be in the hundreds of thousands of pounds.”

Palmer, who owns a log cabin business based on a different part of Easter Hall Park near Okehampton, Devon, claimed items containing his DNA were in the underground facility because growers who rented the land from his father picked them up.

He also claims they set up the operation without his knowledge.

Palmer was granted bail until his sentencing in September.

Judge Paul Cook said: “You will appreciate these are serious matters because of the nature of the operation.”

In the UK, Cannabis is a Class B drug under the Misuse of Drugs Act 1971, which means it’s illegal to have for yourself, give away or sell.

Possession is punishable by up to five years in prison, an unlimited fine or both, while supplying and producing it can land offenders inside for up to 14 years and/or an unlimited fine.