Randy Anderson was already receiving treatment for his cocaine addiction when a federal judge sentenced him to seven years in prison in 2005. He never knew how to make methamphetamine, he said, until he landed there.

A decade sober and working in the chemical dependency field, Anderson testified last year in front of a Legislature poised to make landmark changes to the state's drug sentencing laws.

They went into effect in August, with the intent to lower the sentences of people whose crimes were motivated by addiction — not drug dealing. The laws also attempted to address the racial disparity and overcrowded prisons caused by low-level drug penalties recognized as some of the harshest in the United States.

Now, Anderson and others say the changes should apply to those convicted before the law took effect — but police and prosecutors are opposed. Both sides made their arguments to the state sentencing guidelines commission in a Capitol hearing room Wednesday.

The proposed modification to the new law would recalculate the criminal history scores of all who fall under the new guidelines, not just those convicted after last August. Criminal histories play a key role in the length and severity of a prison sentence.

But the Legislature never intended the law to be retroactive, said Robert Small, executive director of the Minnesota County Attorneys Association. If it were, he said, repeat felons could receive lower criminal history scores and less-severe sentences.

"The modification will now erase the law's intent to distinguish between addicts and dealers," said Small, a former Hennepin County district judge.

Backers of the new law say that, without retroactivity, the spirit and intention of the new guidelines are undermined.

"These were historical reforms that were putting the state down a path of justice and humanity," said the Rev. Gloria Roach Thomas of Camphor Memorial United Methodist Church in St. Paul. "And then, to my surprise, I learned we are rolling back to a repressive system within a year. Going back wouldn't be moral or ethical."

During his testimony, Small said the new guidelines could change presumptive prison sentences to probation and that retroactively reducing drug convictions could also shorten sentences for serious non-drug offenses.

Using data provided by the commission, Small said 596 of the offenders sentenced on a felony drug offense in 2014 would be eligible to have their criminal history recalculated. He said the modifications could "open the floodgates" for litigation.

Chief Hennepin County Public Defender Mary Moriarty said the County Attorneys Association said a law without retroactivity is inconsistent with any other policy on determining criminal history.

"How can it possibly be fair to hold a conviction against someone when that conviction is no longer a felony?" she said.

The key changes in the new drug laws include a shorter recommended prison sentence for first-degree sale and possession of heroin, cocaine and meth and a higher minimum weight to qualify for high-level charges. The sentence for second-degree drug sale was dropped from four years in prison to four years on probation for heroin, cocaine and meth, but some marijuana laws were made tougher.

Commission members didn't respond to testimony. In an interview before the hearing, commission executive director Nate Reitz said there are some exceptions in which they can modify laws without legislative approval.

"There are different people who have a different perspective on this issue," he said. "I think Judge Small is taking the position the modification doesn't fit into the exception category."

The commission will meet Dec. 30 to vote on the proposed modification and then forward a report to the Legislature by Jan. 15. The Legislature can accept the report and take no further action or create a new bill to modify the guidelines.

Even before the new laws, Minnesota's district judges were consistently issuing shorter-than-recommended terms on high-level drug crimes, according to a Star Tribune analysis of 2010-2014 felonies. The most common reason cited was faith that the defendant could be rehabilitated.

Besides Small, only Rep. Brian Johnson, R-Cambridge, challenged the proposed modification. Representatives from a number of faith and community-based organizations rallied in support of the change. Some accused the commission of being incapable of understanding the racial disparity issue in prisons because it had no members of color.

"We need to change how people treat people with addictions," Anderson said. "The war on drugs has failed miserably."