A California man has been freed from prison after serving 23 years for a nonviolent crime, including eight years in solitary confinement for possessing a banned book.

The man, Kenneth Oliver, was first given a life sentence under California’s “three strikes” sentencing law for repeat felony offenders — with his third infraction being joyriding.

Oliver’s release comes seven years after voters in the state voted to reform the three strike rule, making the punishment only available if the third strike was a serious or violent felony. Oliver, 52, was ineligible for a new sentence then, however, because he had been caught with a book written by the co-founder of a gang who died in a bloody escape attempt from San Quentin State Prison in 1971.

His release on Monday followed after Los Angeles County prosecutors dropped their objections, citing their “interest of justice”, and after the state corrections department expunged his gang-affiliation record. He was paid a $125,000 settlement for the time he spent in solitary confinement.

“It's almost impossible to believe that what happened to Ken happened here in California. You know, people think of this as an enlightened state and both the sentence and the time in [solitary confinement] don't square with that,” Ward Johnson, lead counsel for Oliver with Mayer Brown law firm, said.

Oliver’s third strike arrest occurred while he was a passenger in a stolen vehicle, leading him to plead guilty to taking a vehicle without permission.

Police then found a stolen handgun in his hotel room. He had a legal history dating back to when he was 16-years-old.

When voters in California decided to abolish the three strikes rule, nearly 3,000 people were released from prisons. Some 200 to 500 inmates who qualify for release remain incarcerated, however, according to estimates.

The Associated Press contributed to this report