Three men have denied conspiring to supply illegal drugs which were found by police during a raid on a Buckinghamshire kennels.
Ecstasy and cannabis worth millions of pounds was found at Crossleigh Kennels in Chalfont St Giles.
Martyn Lock, 44, of Stokenchurch, Bucks, Peter Dobson, 42, of Northolt, Middlesex, and David Jones, 60, of Chalfont St Giles deny the charges.
Mr Dobson also denies possessing with intent to supply ecstasy and cannabis.
The court heard that when police arrived at the kennels on Monday 30 October last year, defendant Peter Dobson gave them a key to a mobile building.
He said: "You will be smiling when you open it," St Albans Crown Court was told by a prosecution barrister.
Prosecutor Alan Landsbury alleged Dobson then said: "They are all mine. It is all my responsibility."
In a search of the site, and at Dobson's address, more than 500,000 ecstasy tablets with a value of £2m were allegedly found.
Police also recovered 100 kilos of cannabis valued at about £500,000, said the barrister.
Amit Suji, 26, of Hounslow, London, had pleaded guilty to possession of drugs with intent to supply.
The case continues.