Kim Kardashian-West, the reality TV and social media star turned criminal justice reform advocate, was touring the D.C. jail in July when she met a murderer.

There for the taping of a TV documentary on the criminal justice system, Kardashian-West sat down in the jail library with Momolu Stewart. She was trying to see whether the 39-year-old had developed into a different person from the angry, trouble-prone teen he was decades ago when he fired multiple shots at the head and back of an unarmed man.

Stewart, who was 16 when he committed the crime, in February asked the court to grant him early release under a recent law. After their meeting, Kardashian-West agreed to write a letter to the D.C. judge overseeing Stewart’s petition for resentencing.

“I write to humbly request your compassion and humanity in supporting the release of Momolu Stewart,” she said in the two-page letter. “I have been actively involved in cases across the country and in my view, Momolu is especially deserving of your consideration.”

“He has been rehabilitated and is no longer dangerous to society,” she wrote, adding, “I also have every confidence that upon his release he will continue to guide others away from a life of crime and continue on his own path to redemption and success.”

This month, after holding court hearings and receiving more than 40 letters from organizations and civic leaders also supporting Stewart, Superior Court Judge Robert Salerno granted the petition to reduce his life sentence.

But Salerno has yet to say whether Stewart will be released soon or have to serve additional time. That decision, the judge said, will come after an October hearing during which people impacted by Stewart’s crimes will have a chance to speak out.

Stewart’s attorney, Betsy Henthorne, telephoned Stewart at the jail to give him the news.

“He was speechless. This completely changes his life,” said Henthorne, who worked on the case for free.

Stewart is the 21st inmate to have his petition decided under a 2017 law called the Incarceration Reduction Amendment Act. The District law allows inmates who committed their crimes when they were younger than 18 and spent at least 15 years in prison a chance to have their sentence cut. Under the law, they must show signs of rehabilitation behind bars.

Studies have shown that the brains of teenagers and young adults are not fully mature, and the idea behind the legislation is that those who offend at younger ages should not receive adult punishments of decades in prison. So far, 19 inmates have been released under time served.

In recent weeks, an effort to expand the law has been the subject of heated debate. D.C. Council member Charles Allen (D-Ward 6) wants to change the law to include people who were between 18 and 24 at the time of their crimes. The U.S. attorney for the District and the city’s police chief have lobbied against the proposed change, which has yet to come to a vote.

Judges handling the cases look to see whether the applicant has proved to have been rehabilitated, has taken educational or vocational classes, and has shown remorse and stayed out of trouble behind bars. In considering a list of criteria, they review letters from victims and their families, the inmate’s prison record and reports by prison staff, among other things.

Stewart was one of two teens convicted in a New Year’s Day murder 22 years ago. The other teen, Kareem McCraney, now 39, last year became the first inmate released under the law.

McCraney, now a paralegal working with others seeking early release, recounted the crime at his resentencing hearing. He told a judge that he and Stewart had gone that day to confront Mark Rosebure, 22, at an apartment building in Southeast Washington. McCraney said Rosebure stole money from him and threatened his mother. By McCraney’s account, Rosebure made a gesture to his waistband, prompting him and Stewart to pull out their weapons and shoot.

Prosecutors had called the crime a robbery gone bad. The teens fired nearly a dozen shots.

While in prison, Stewart earned his GED in 2009 and racked up 1,400 hours of educational programs including behavior modification, anger management and African studies. He also studied yoga. He has taken college courses at Georgetown University, where he met Marc Howard, the founding director of Georgetown’s prison education program. Howard is working with Kardashian-West on her documentary and introduced her to Stewart.

Stewart, Howard said, “is the perfect representation that people are greater than the worst things they’ve done and that people transform over time.”

But federal prosecutors — as they have done with the majority of the other applicants — opposed immediate release for Stewart. They stressed that, unlike some others who applied for resentencing, Stewart had more than one case. He had been convicted in two assault with deadly weapon cases before the murder.

Also, Stewart was cited for 32 violations while in prison, including a 2016 possession of a weapon and drugs in his cell.

Prosecutors also noted that Stewart twice appealed, arguing that he was innocent of the homicide charge. He even filed an affidavit that said he and another childhood friend were in New York when Rosebure was killed.

At a D.C. Superior Court hearing last month, Assistant U.S. Attorney Timothy Cahill said those infractions proved Stewart was not ready to be set free. Cahill said he would not oppose having Stewart released in eight to 10 years.

“The government believes he needs more time to prove that he will have no more violations and no longer turns to drugs and violence,” he said.

Henthorne said Stewart’s fictitious innocence claims happened before she took his case.

“I wish he had not done it, and he wishes he had not done it,” the attorney said. “He was desperate with a life sentence.”

Henthorne argued that Stewart has now accepted his responsibility for the murder and has devoted his time to working with youths to make sure they do not make similar mistakes.

At an August hearing, Stewart stood before Salerno and described his childhood. He spoke of how when he was 6 years old, his mother paid a man $250 to kill Stewart’s father. The murder happened while Stewart and his sister were in their Northwest D.C. home.

Stewart’s mother, Gloria, then 29, told authorities she had been repeatedly abused by her husband. She was convicted of murder and sentenced to 13 years to life in prison. Stewart and his sister went to live with relatives, who he said were physically abusive.

Stewart told the judge he struggled with the loss of his parents, especially his father, Robert, whom he referred to as his “hero.” Robert Stewart earned his doctoral degree in Liberia and then moved to the United States, securing a job at Howard University, where he worked until his death at age 38.

“Losing my mother and my father caused a shift in my life. When I was a teenager, I forgot what my father stood for,” Stewart said.

Stewart then began to cry.

“A lot of people don’t understand trauma and what it is to overcome trauma,” he said. “I’m not perfect. But I’m not a monster.” Stewart’s mother rushed out of the courtroom sobbing.

Stewart also publicly accepted responsibility for the murder.

“I apologize to Mr. Rosebure’s family,” he said. “I apologize to my family. I apologize to everyone. I am guilty.”

In his ruling, Salerno said he was most concerned about the victims’ families in Stewart’s cases, which is why he set another hearing to allow them to speak.

Rosebure’s niece, Marquieta Bagley, could not be reached for comment. But she previously said in court that she did not oppose early release for McCraney, Stewart’s co-defendant, if he was indeed rehabilitated and pledged to work with troubled youths.

Henthorne said Stewart is a changed person with something to offer his community.

“It’s unreasonable to expect someone to be completely perfect while in prison,” she said. “The law is about looking at the person’s trajectory. Is the person the same as who they were when they committed the crime? And are they a danger to community?”