SAN FRANCISCO (KPIX) — Thanks to a law passed in 2018, prosecutors have the power to resentence prisoners whose time behind bars seems unjust. Now, the Contra Costa County District Attorney’s office has helped release a man from prison who they themselves had put behind bars, not because he was innocent, but because he just didn’t deserve to be in prison any longer.

In 2004, Derric Lewis broke into a home in Orinda, stealing a purse and bicycle. Because of the so called ‘three strikes law,’ he was sentenced to 27 years in prison. But AB 2942 authorizes prosecutors to look back at old sentences that don’t reflect today’s standards.

READ MORE: COVID: Service Industry Employers Lament Lack of People Willing to Fill Open Jobs

“We would not impose that same sentence and we would not believe that sentence was serving the interest of justice” said Contra Costa District Attorney Diana Becton. “And I do think it serves us well as district attorneys to be able to have this new power to go back and look at some old draconian sentences.”

During his 17 years in a Southern California prison, Lewis turned his life around, kicking his addiction, taking college classes and mentoring other inmates. So, the District Attorney’s office — the very office that put him away — has now helped him become the first convict in the county to have his sentence reduced and he is now a free man.

“We knew there were prosecutors across the state that were willing to look back at past sentences,” said Hillary Blout. As a former SF prosecutor, she helped write AB 2942 and founded a group called ‘For the People’ to advocate for those serving overly harsh sentences.

READ MORE: Farms, Ranches In Southern Santa Clara County Grapple With Worsening Drought

“Any prosecutor knows they’ve got a case they prosecuted and they think about that case, think about the deal and think about the sentence and wish they could go back and do something about it,” said Blout.

Lewis was the first in Contra Costa, but across the state more than 60 inmates have gotten a rare chance to reclaim their lives from behind prison walls. Brandon Banks, the public defender who represented Lewis through the process, says while Lewis is deserving, he is by no means unique.

“We have far too many people who are in state prison, who have the ability to make a contribution to our community,” he said, “who want to make a contribution and are just waiting for that opportunity.”

MORE NEWS: Firefighters Knock Down 2-Alarm Fire at Walnut Creek Senior Facility; Explosions Reported

District Attorney Becton says she felt supported in her decision to re-sentence Lewis after the victims of his burglary also agreed that he should be released.