Police discovered an “industrial scale” cannabis factory when they raided a flat above a Chinese takeaway in Coupar Angus.
More than 600 plants in various stages of maturity were seized and at the time officers estimated the street value of the drug to be £350,000.
Illegal immigrant Yan Ping He, who was acting as a gardener for the cannabis crop, was spotted inside the house in Athole Street but refused to answer the door.
Officers threw a cordon around the property while they applied for a search warrant but, a short time later, a taxi drove past with He sitting in the front passenger seat.
Depute fiscal Charmaine Cole said: “They stopped the vehicle and the accused, who couldn’t speak any English, appeared to be trembling.”
The 26-year-old was arrested and admitted being concerned in the supply of the class B drug when he appeared on indictment at Perth Sheriff Court on Thursday last week.
A not guilty plea to a second charge of being concerned in the supply of cannabis was accepted by the prosecution.
He, who has been in custody since December 17, will be sentenced on April 4 after a background report has been obtained.
Sheriff Alistair Brown warned: “A significant custodial sentence is something I inevitably have to consider.”
Solicitor Cliff Culley, for He, said the value of the cannabis was being contested and ongoing discussions were taking place with the Crown in a bid to resolve the matter.
Ms Cole said the house, near the centre of Coupar Angus, had been rented on August 15, 2012, by a Chinese man – not the accused.
“Around November 16 neighbours who lived across the road observed several vans coming and going from the property at what they considered strange times,” she added.
“People they thought were of Chinese origin were also seen loading and unloading large boxes.”
Their suspicions were passed on to the police but they did not have enough information for a search warrant at that time.
Officers, however, got in touch with the landlord who accompanied them to the house on December 16.
“The first officer who approached the house found that the windows had been covered with black polythene carrier bags and there was a strong smell of cannabis coming from it.
“They knocked on the door and observed the accused looking out a window but he refused to answer.”
After obtaining the search warrant scenes-of-crime officers took a video of the rooms which showed hundreds of plants at different stages of cultivation.
There was also sophisticated heating, lighting and ventilation equipment, as well as other drugs paraphernalia, including chemicals to aid the growing process.
Sheriff Brown said it appeared that all available space in the property was being used to “produce cannabis on an industrial scale.”
When He was being fingerprinted it emerged that he had failed to comply with a temporary release licence issued by the UK Borders Agency in 2010.
No deportation notice has yet been served on the accused, who was remanded in custody.