When Annetta Bryant saw her son turn the corner Wednesday morning, she clasped her hands under her chin and beamed with pride.

Tears gathered at the corners of her eyes as the truth became clear.

Calvin Bryant had walked into Courtroom 6A in shackles for the last time.

He was free.

The young man got a 17-year sentence for a non-violent drug offense committed in 2008. It was his first criminal charge, but his penalty matched sentences typically doled out to people convicted of rape or second-degree murder.

Read more:He got 17 years for selling drugs near school. Now 12 Nashville officials are fighting on his behalf.

A state law that is now seen as discriminatory allowed prosecutors to tack on extra time because Bryant sold party drugs within 1,000 feet of a school. It didn't matter that he did it in his apartment at night, or that no children were put in danger.

School zone laws were designed to protect children from drugs and related crime, but in practice they are more likely to penalize people of color who live in densely populated urban areas, even when their crimes have nothing to do with the school or children.

After more than 10 years in prison, Bryant's sentence has attracted widespread outrage, with a former federal judge, Nashville city leaders and even the original prosecutor in the case speaking out on Bryant's behalf.

District Attorney Glenn Funk, who wasn't in office when Bryant was prosecuted, said cases like his do not receive such a harsh penalty today. And Judge Steve Dozier, who handled the case, acknowledged the sentence was "harsh."

CALVIN BRYANT:Judge agrees man's 17-year sentence for dealing drugs is 'harsh,' but leaves it in place

Even so, Bryant and his lawyer Daniel Horwitz hit dead ends as they sought help from the appellate system and federal courts.

For a while it seemed that Bryant, now 32, would stay in Riverbend Maximum Security Institution even though nearly everyone involved in the case believed he shouldn't be there.

But on Wednesday, there was a breakthrough. Funk brokered a deal with Horwitz that allowed Bryant to plead guilty to drug charges with a lower sentence of 10 years, which he has already served.

The deal made Bryant a free man.

Dozier acknowledged the almost unprecedented nature of the proceedings and urged Bryant to make the most of his second chance: "Do something good," the judge told Bryant.

A soft-spoken Bryant asked to say a few words before he left, infusing gratitude and joy into a typically dreary courtroom routine.

"I take full responsibility for my actions," Bryant said. "I look forward to making something out of myself."

Sitting in the gallery, bouncing Calvin Bryant's baby nephew on her knee, Annetta Bryant couldn't believe her ears. She met Funk in the hallway outside and tugged on his sleeve, asking if it was her son would really come home with her in hours.

Yes, Funk said. It was true.

"This is one of the best days of my life," Annetta Bryant said. "A long time coming, but it's here."

Horwitz credited Calvin Bryant's army of supporters, who had lobbied for help in the case. He also praised Funk, who he said played a key role in establishing the new deal.

"This would not have been possible without a DA sticking his neck out to right this wrong, and without a mountain of supporters," Horwitz said. "This is, and I'm not exaggerating, the most unfair sentence I have ever seen."

Horwitz said a clemency petition to Gov. Bill Haslam would remain active. If Haslam commutes Bryant's sentence, it could allow him to get it expunged.

Bryant is determined to make the most of his second chance by helping other young men like him and contributing to his community. He'll also be caring for his mother, who has health issues related to diabetes.

"Today is the first step of the rest of Calvin's life," Horwitz said.

Annetta Bryant was at Riverbend to meet her son Wednesday afternoon when he was released and his new phase began. The pair radiated warmth sitting in attorney Joy Kimbrough's office soon afterward.

"It feels real good don't it mama?" Calvin Bryant asked, shortly before wrapping her in a long hug.

"Yes it do baby," his mother answered. "Yes it do."

SUPPORT LOCAL JOURNALISM: Coverage that makes a difference in your community. On sale now.

Reach Adam Tamburin at 615-726-5986 and atamburin@tennessean.com. Follow him on Twitter @tamburintweets.