Man who spent 36 years in prison for stealing $50 from a bakery is now set to be freed originally appeared on abcnews.go.com

A man in Alabama just had his sentence changed so that he’ll be getting out of prison in the next few days.

His crime: Stealing $50.75 from a bakery 36 years ago.

Alvin Kennard was 22 years old when he was sentenced to life without the possibility of parole back in 1984. Alabama state law at the time mandated that since it was his fourth offense, the judge had no other option than to sentence him to life in prison.

(MORE: Inside the nightmarish world of Alabama prisons and the DOJ's attempt to fix them)

That law, the Habitual Felony Offender Act, has since been changed so that judges now have the option of giving fourth-time offenders the possibility of parole. But when that change took place in the early 2000s it wasn’t made retroactive, so it didn’t automatically prompt a re-sentencing in Kennard’s case.

Instead, it was the curiosity of a judge that led to the re-sentencing of Kennard, who is now 58 years old.

"The judge in this case noticed how odd it seemed that someone was serving life without parole for a $50 robbery," said Kennard’s attorney, Carla Crowder, who said it was Jefferson County Bessemer Cutoff Circuit Judge David Carpenter who saw Kennard’s case when some documents came across his desk.

"This was a judge that kind of went out of his way," Crowder told ABC News.

PHOTO: Alvin Kennard before his hearing Wednesday, August 28, 2019, where a judge ordered he had served his time and should be released from prison. (Ivana Hrynkiw) More

Assistant District Attorney Bill North said that Kennard’s behavior in prison played a role in the judge’s decision when, on Wednesday, the judge decided to change Kennard’s sentence to time served, effectively prompting his release in the coming days.

North said that "other than a few ‘settling in’ issues 30 years ago, [Kennard] appeared to be a pretty exemplary inmate."

The underlying reason why Kennard, a man who now lives in the faith-based wing of Donaldson Correctional Facility, was sentenced to life without parole for the robbery of Highlands Bakery in 1983 was because he had been previously convicted of three non-violent property crimes.

In 1979, back when Kennard was 18 years old, he pleaded guilty to three counts of second-degree burglary in connection with a break-in at an unoccupied service station, his pleading documents state. For those three charges, all of which were tied to that one incident, he was sentenced to three years’ probation.

The next time he was convicted, for the bakery robbery -- which was committed with a pocket knife and involved no injuries -- he was sentenced to life without the possibility of parole.

(MORE: $6,250: What an inmate cleared of murder could get per year behind bars)

If the same crime had been committed today, and current sentencing standards were used, even with prior offenses taken into account, Kennard’s pleading document states that he would have been eligible for a minimum sentence of 10 years and a maximum sentence of 21 years in prison.

Crowder said that since the change in the sentencing laws was not retroactive, there are upwards of 250 prisoners who were similarly sentenced and remain behind bars in part because they simply do not have attorneys pushing for their cases to be re-sentenced.

"As incredible as this opportunity is for Mr. Kennard and as happy as we are for him, we know that there are hundreds of similarly situated incarcerated people in the state who don’t have attorneys, who don’t have a voice," Crowder said. "As this state grapples with the Department of Justice involvement and unconstitutional prisons, I would hope our lawmakers, our courts and our governor would do more to address these injustices."

Crowder told ABC News she recently got involved in Kennard’s case when Carpenter asked her to take a look at it.

"When I first went to visit him," Crowder said of her trip to meet Kennard, "the guard was chatting with me, and when he saw who I was visiting, he said, ‘That’s one that you could let him out and he wouldn’t cause any more trouble.’"

Story continues