Brown, 30, will be released to supervised parole Aug. 7, said Haslam, who will leave office this month. She will have served 15 years in prison.

“Cyntoia Brown committed, by her own admission, a horrific crime at the age of 16,” Haslam said. “Yet, imposing a life sentence on a juvenile that would require her to serve at least 51 years before even being eligible for parole consideration is too harsh, especially in light of the extraordinary steps Ms. Brown has taken to rebuild her life.”

“Transformation should be accompanied by hope,” he said.

Brown’s story attracted widespread attention and support from celebrities, including Rihanna and Kim Kardashian West. Lawmakers and rights activists highlighted the years of abuse and forced prostitution she endured in her youth and lobbied the governor to grant her clemency before his term was up.

Brown “lit up” with joy Monday when she heard the news from Charles W. Bone, one of her lawyers, who blurted out immediately when he saw her: “You are getting out in August.”

In a statement, Brown thanked the governor “for your act of mercy in giving me a second chance. I will do everything I can to justify your faith in me.”

She also thanked Department of Corrections officials who helped her get an education and “saw something in me worth salvaging.”

Bone said at a news conference that he was looking forward to the day he could see Brown “walk out of prison.”

“She deserves this, and deserves the full credit for it,” Bone said.

Activists and lawyers who had supported Brown said her case reflected the need for criminal justice reform, particularly in cases of juvenile offenders who have been traumatized and can be rehabilitated.

One of her lawyers, J. Houston Gordon, said the case should be seen as a “clarion call” against what he described as draconian laws that put children in prison. “We need to see this as a national awakening,” he said.

Brown’s mother, who abused drugs and alcohol, placed her for adoption as a child, according to court documents. At 16, Brown ran away from her adoptive family and started to live in a motel with a pimp who raped her and forced her to become a prostitute.

In 2004, Johnny M. Allen, 43, a real estate broker, picked up Brown at a restaurant in Nashville, Tennessee, and drove her to his home, after she agreed to engage in sexual activity for $150, court documents say.

After they got into bed, Brown said she thought he was reaching for a gun to kill her. She later shot him in his sleep with a handgun from her purse, took money and two guns, and fled, documents say.

Brown, tried as an adult, was convicted by a Davidson County jury in 2006 of first-degree murder and aggravated robbery. She was sentenced to life in prison and would not have been eligible for parole until 2055.

Instead, she will be released exactly 15 years after her arrest. Brown will then be under supervised parole for 10 more years, until Aug. 7, 2029.

Lawyers and supporters at the news conference said Haslam’s decision was a courageous one that would also have its detractors.

His term is set to end Jan. 19, and the lobbying on Brown’s behalf sped up as his days left in office dwindled.

Last week lawmakers in the state urged him to grant Brown clemency, while a detective who had worked on the murder case published a letter opposing it.

Bishop Joseph W. Walker III of Mount Zion Baptist Church in Nashville said in an interview that he had had a “moral conversation” with the governor, and that he had counseled Brown while clemency was being considered. He said the governor had heard from both sides.

Brown’s release “represents a win, and restores hope for so many brown and black people,” he said.

While in prison, Brown earned her high school equivalency diploma and an associate degree, with a 4.0 GPA, from Lipscomb University’s LIFE program, which allows prisoners in the Tennessee Prison for Women to work toward a degree. She is continuing her education and is expected to earn a bachelor’s degree in May.

“Numerous Department of Correction employees and volunteers attest to her extraordinary personal transformation while incarcerated,” Haslam said, “which will allow her to be a positive influence on the community upon release.”

Brown said she hoped to “live the rest of my life helping others, especially young people.”

She added: “My hope is to help other young girls avoid ending up where I have been.”

This article originally appeared in The New York Times.