A Hayward man admitted he had cocaine in his sock when he arrived at the Douglas County Jail.
Jose Oscar Mata Guardado, 22, told Judge Michael Gibbons he got the drugs while he was in lock-up awaiting extradition to Douglas County on another case.
Guardado is seeking diversion to a drug treatment program.