On Valentine's Day, Gary Alan Coe was resentenced after being locked up for 20 years under California's three-strikes law, which carried a mandatory life term following a third conviction.

The 58-year-old then was released from prison last week after serving more than a third of his life behind bars for stealing perfume in 1997.

On Sunday, Coe unexpectedly emerged from the shadows of America's prison system as part of a group of unsuspecting tourists delivered by bus to the broadcast of the Academy Awards.

There was Coe, in a baseball cap and Hollywood sweatshirt, planting a kiss on Nicole Kidman's hand and hobnobbing with Ryan Gosling and Denzel Washington while capturing it all on his cellphone.

Coe's story is one of time served and atonement, a reminder of the extraordinary human toll of sentencing laws that hurt the poor, minorities and the mentally ill especially hard, according to legal experts.

'It's so Gary -- knowing him'

"It's a sad day to be in prison for 20 years and not be able to be a dad, granddad to your children. You know what my son told me today, man, and I almost come to tears. He said he's proud of me. So to hear your children say that they're proud of me means the world to me."

Coe, who couldn't be reached by CNN for comment, went to prison after being convicted of petty theft in 1997 for stealing some perfume on New Year's Eve, according to court records.

Under California law at the time, the conviction earned him a 25 years to life sentence because of prior convictions for robbery in 1985 and 1982 as well as an attempted rape conviction in 1978. The earliest offense of attempted rape by force or fear landed him on the California website of registered sex offenders.

His Los Angeles public defender, Karen Nash, said on Wednesday that Coe was 18 when he was charged with attempted rape in 1975. She said he pleaded guilty and completed a prison sentence of two to six years in Chicago.

"Gary is the perfect example redemption," she said. "He's the real deal as far as being rehabilitated. He did all this on his own in prison."

Coe appeared on the Oscars broadcast with his fiancee, whom he met while mentoring her nephew in prison. On Sunday night, his fiancee was tired after walking the streets of Los Angeles with Coe. He took her purse, which he was still carrying on live TV, and they were resting on a street bench when offered tickets to a Hollywood tour.

"Gary asked, 'Well, how much is it going to cost,' " said Nash, who speaks with Coe regularly.

"He doesn't have a lot of money and they said it would be free. So they hopped on the bus and you know the rest."

Coe became an instant social media sensation, standing elbow-to-elbow with Hollywood's biggest names.

"It's so Gary -- knowing him" Nash said. "If it was going to happen to anybody, it would be him."

'Opportunities for reform, rehabilitation and redemption"

Coe's life sentence stemmed from the Three Strikes and You're Out law enacted by California voters in 1994. It imposed a life term for almost any crime if the defendant had two previous convictions for crimes defined as serious or violent by the California Penal Code, according to the Stanford Law School's Three Strikes Project.

Official ballot materials promoting the law said its aim was to "keep murderers, rapists and child molesters behind bars, where they belong," according to the Stanford project's website.

More than half of inmates sentenced under the law were serving sentences for nonviolent crimes.

"There are tremendous stories of people like Gary, reuniting with their families and their communities and getting back to work and paying taxes and safely rejoining society," Michael Romano, director of the Three Strikes Project, said Wednesday.

Statistics from the California corrections department showed that more than 45% of inmates serving life sentences under the three strikes law were African-American. The law was also applied disproportionately against mentally ill and physically disabled defendants, according to the Three Strikes Project.

In 2012, California voters overwhelmingly approved the Three Strikes Reform Act, also known as Proposition 36, which eliminated life sentences for non-serious, nonviolent crimes. Inmates sentenced to life in prison for minor third strike crimes could receive a reduced sentence if a court determined the prisoner no longer poses an unreasonable threat to public safety.

"The reactions of people who are offended by Gary's presence at the Oscars, first of all, don't reflect the overwhelming support from California voters who passed these reforms, don't reflect the judgment of the court that found he was no longer a threat to public safety and fly in the face of opportunities for reform, rehabilitation and redemption," Romano said.

"The reform in California has been a tremendous success both in terms of public policy, but I also think in terms of personal redemption. On the policy level the number of people who have gone back to prison is about five times better than the average recidivism rate of people leaving prison."

'Who Gary is now'

Romano said more than 2,000 inmates sentenced to life in prison for nonviolent crimes under California's three strikes law have been released since 2012.

"Both from a policy level and a personal level and what little we know about Gary ... his personality showed, I hope, a glimpse that there is redemption and grace and an opportunity for rehabilitation," Romano said.

"I really do hope all the best for him. It must have been unbelievably overwhelming for him to hook on from ... serving a life sentence to have gotten this news from the court and then to be plucked off the street and thrown into this (Oscars) stunt."

Coe told ABC 7 he found religion while behind bars. Nash said he has been clean of drugs and alcohol since 2004. He's looking for a job.

"We as public defenders get to see the person whereas somebody else will just see a rap sheet," she said.

"And what's so great about Gary's story is the whole country saw this really charming, charismatic, positive, chivalrous man on TV. That's who Gary is now."