Cody Gregg's case was dismissed on Friday

Dried Milk
Credit: Getty Images

An Oklahoma man has been cleared of drug charges after lab results showed that he was not in possession of cocaine, but of powdered milk.

Cody Gregg was first arrested back in August when a police officer tried to pull him over for not having lights on the back of his bicycle, USA Today reported. He was reportedly on probation at the time.

A chase followed, according to an affidavit obtained by The Oklahoman, with the homeless man eventually jumping off the bike and running away on foot. The police officer eventually stopped Gregg, and found “a large amount of white powder substance” in a coffee can in his backpack, the affidavit reportedly said.

• Want to keep up with the latest crime coverage? Click here to get breaking crime news, ongoing trial coverage and details of intriguing unsolved cases in the True Crime Newsletter.

The officer “believed” the substance “to be cocaine based on my training and experience,” and said that the substance initially tested positive for cocaine during a roadside test.

However, lab testing later revealed that the substance was, in fact, powdered milk, which Gregg told Oklahoma County District Judge Timothy R. Henderson he got from a food pantry, The Oklahoman reported.

RELATED VIDEO: LaLa Kent Speaks Out About Sobriety Amid 50 Cent Feud: ‘I’ve Never Done Cocaine’

Though Gregg initially pled not guilty to the felony charge of cocaine possession with intent to distribute, he changed his plea to guilty after nearly two months in the Oklahoma County Jail, where was held since his arrest in August. According to The Washington Post, Gregg told the judge he had entered the guilty plea so he could leave the Oklahoma County Jail, which has been called one of the worst in the country.

Last week, Gregg was sentenced to 15 years in prison, but after the lab report showing that he was not in possession of cocaine, requested to withdraw his guilty plea. Henderson granted the withdrawal on Thursday, and the case was dismissed on Friday.

A lawyer for Gregg could not immediately be located.

The Washington Post pointed out that although roadside tests for illegal substances like the one used in Gregg’s case often produce false negatives, many police departments continue to use them.