A man ran a cannabis factory from rented premises inside railway arches at Sheffield station.
Martin Lee Kemp, aged 41 and of Ridings Avenue, Barnsley, has been given an 18-month suspended sentence after pleading guilty to cannabis production.
He has also been ordered to carry out 180 hours of unpaid work and is subject to a three month curfew from 9pm to 6am on an electronic tag.
On December 17 last year, a Network Rail employee found four large hydroponics tents while carrying out a routine fire safety check and immediately called British Transport Police.
Officers found that of the four tents, one was in operation with an electricity and water supply sustaining 16 plants.
As the premises were being examined, Kemp arrived at the unit and was subsequently arrested on suspicion of cannabis cultivation.
A search of his car produced cannabis seedlings and an amount of cocaine with a street value of more than £600.
Officers later searched Kemp’s home in Barnsley where they found plastic containers of cannabis and a quantity of cash.
Investigating officer DC Ian Grice, from British Transport Police, said: “Despite Kemp’s best efforts to run a covert cannabis cultivation unit from Network Rail premises, a chance safety check uncovered his illicit operation and has landed him with a criminal record.
“British Transport Police is committed to tackling the use and supply of illegal drugs – not just on the railway itself, but also across the wider rail infrastructure and we will continue with this approach to tackling those who seek to profit from criminal activity.