The Tennessee governor, Bill Haslam, has granted clemency to a woman serving a life sentence for murder who says she was a victim of sex trafficking and who has been supported by celebrities including Rihanna and Kim Kardashian West.

The Republican governor, whose term ends in two weeks’ time, chose to show mercy to the now 30-year-old Cyntoia Brown by releasing her on 7 August this year. Brown was sentenced to life in prison for killing a man when she was 16.

She will remain on parole supervision for 10 years on the condition she does not violate any state or federal laws, holds a job and participates in regular counseling sessions.

Brown was convicted in 2006 of murdering a 43-year-old Nashville real estate agent, Johnny Allen, two years before. Police said she shot Allen in the back of the head at close range with a loaded gun she brought to rob him after he picked her up at a Nashville drive-in.

According to her lawyers, Brown was a victim of sex trafficking who not only feared for her life but also lacked the mental state to be culpable in the slaying because she was impaired by her mother’s alcohol use while she was in the womb.

“Cyntoia Brown committed, by her own admission, a horrific crime at the age of 16,” Haslam said in a statement. “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.”

Brown’s case has attracted national attention from criminal justice reform advocates, and attention increased as Haslam’s second and final term entered its final weeks. Celebrities threw their support behind the fight for her release. The governor’s office was inundated with thousands of phone calls and emails from supporters.

“Thank you Governor Haslam,” Kardashian West tweeted soon after news of the clemency decision broke.

👏🏼👏🏼👏🏼 Thank you Governor Haslam 👏🏼👏🏼👏🏼 https://t.co/rAiru84fgn — Kim Kardashian West (@KimKardashian) January 7, 2019

Brown expressed thanks in a statement released by her legal team.

“I am thankful for all the support, prayers, and encouragement I have received,” she said. “We truly serve a God of second chances and new beginnings. The Lord has held my hand this whole time and I would have never made it without him. Let today be a testament to his saving grace.”

Here is a statement from #CyntoiaBrown following the announcement from @BillHaslam that he will grant her clemency. @WKRN pic.twitter.com/54uuACwaXW — Josh Breslow (@JoshBreslowWKRN) January 7, 2019

The US supreme court has ruled against life-without-parole sentences for juveniles. But the state of Tennessee argued successfully in lower courts that it was not in violation of federal law because Brown did have a possibility for parole: she was sentenced to serve at least 51 years of her life sentence.

During her time in prison, Brown completed her GED and took college classes. She is one course away from finishing a degree at Lipscomb University.

The Nashville mayor, David Briley, praised Haslam’s decision, calling it a “great day for social justice and our city”. The Democratic state senator Raumesh Akbari said the clemency announcement showed that Tennessee “can show love, compassion and mercy” for people who have experienced trauma.

Haslam has granted five commutations, 15 pardons, and one exoneration. The Republican says he is continuing to review and consider additional clemency requests.