Rapper Tekashi 6ix9ine is asking a federal judge this week for a second chance to live a better life.

The 23-year-old scream rapper, whose legal name is Daniel Hernandez, is facing up to 47 years in prison for federal charges that include racketeering, violent crimes to aid the racketeering and firearm offenses connected to his affiliation with the New York-based Nine Trey Gangsta Bloods, according to court records.

The gang’s activities include murder, robbery and narcotics trafficking, according to the indictment. Hernandez was complicit and active in helping the gang accomplish its mission of maintaining power and intimidating rivals, court records state.

But that life is behind him now, and he’s glad to be in the public eye as an example of the consequences of gang affiliation, Hernandez wrote in a letter to U.S. District Judge Paul Engelmayer. The Brooklyn-based rapper expressed remorse for his actions in his letter and requested leniency at his sentencing Dec. 18.

His mother and brother are also asking for the judge’s leniency, explaining that past experiences caused Hernandez to get involved with the wrong people.

“I know that this is part of the plan that God has for me and I am confident that I am ready to face this thing head on,” Hernandez wrote.

Hernandez has denounced the gang, disassociated from the organization and has turned on his former gang members to help prosecutors in exchange for a lighter sentence — a grave violation of street code of conduct that’s led to his being branded a “rat.”

The fallout of those actions involved him being kidnapped by gang members and discovering that the mother of his child was romantically involved with one of his co-defendants and stealing money from him, he wrote.

He welcomed his arrest by federal agents, he said.

“I had a feeling of relief when I was arrested by the government because I felt stuck,” he wrote. “The gang had control of my life. … I would never be able to escape their grip.”

Hernandez’s incarceration has given him time to ponder whether he was truly remorseful for his crimes or if he was upset about being caught, he said. He said he now knows it’s the former.

“I was blessed with a gift of an opportunity that most people dream of but I squandered it by getting involved with the wrong people and misrepresenting myself when I should have been true to myself and my fans,” he wrote.

Hernandez told prosecutors in October that he got involved with the gang as a way to lend street credibility to his burgeoning rap career. Prosecutors in Hernandez’s case wrote their own letter to the judge last week, also asking for a lighter sentence.

The young rapper, who amassed fame on the music-sharing platform SoundCloud, proudly boasted of his gang affiliation, even creating an ode to the crew in “Blood Walk” last year while throwing up gang signs in a studio video as fellow gang members covered in red bandannas bobbed along.

His relationship with the gang soured over disagreements about the management of his increasing mainstream popularity, with his Skittles-colored hair, matching rainbow diamond-encrusted teeth and debatable rap talent.

The person known as Tekashi 6ix9ine who sported a jigsaw tattoo on his right cheek was different from the loyal family man he was, according to his older brother, Oscar Hernandez.

Daniel Hernandez, not Tekashi 6ix9ine, was a devoted father to his daughter despite his growing up without a father figure of his own, Oscar Hernandez told the judge.

His younger brother was a “magnet for people with malicious intent,” Oscar wrote, explaining that the controversial rapper could possibly impact other young people in the community in which they were raised.

Hernandez was once a happy, churchgoing kid who had many athletic abilities until he spiraled into deep depression when his stepfather died, his mother, Natividad Perez-Hernandez, wrote in her own letter.

Music helped him overcome his pain, and as his star grew, he continued to be an emotionally and financially supportive son deserving of another chance at his life, she said.

A second chance might be dangerous for someone who was under the umbrella of gangsters, according to Dedric “Beloved” Hammond, a former gang member and advocate.

“The model is whatever way you got in is the only way you can get out,” he told The Washington Post, specifying that each gang has its own terms and rules for members.

Hammond said Hernandez could return to his community if he really tries to invest in youths on the verge of following his path — or if he pays a heavy price to ensure the protection of his family and himself.

“Everybody knows who he is,” Hammond said. “There’s nowhere he can go and be all right unless he goes to another country and stays covered all day.”

Hernandez pleaded guilty to all charges against him.

Read more: