6ix9ine claims he has found the silver lining in his federal racketeering case: It helped him escape gang life.

According to a legal letter obtained by Page Six, the 23-year-old rapper expressed remorse over his actions that led up to his 2018 arrest. 6ix9ine told Manhattan federal court judge Paul Engelmayer he has spent the last year behind bars reflecting on his time with the Nine Trey street gang, which he allegedly joined about two years ago. 

"I find it difficult to find the right words to express what my life has been like for the last year," he wrote in the letter. "It honestly feels like my world is crashing down. There is no excuse, no justification and no apology good enough in this world to explain my crimes ... I wake up every morning asking myself was it worth it? I know that my life will never be the same but hopefully this change will be for the better because beyond all of this, I still consider myself a role model to millions of people as an artist, a celebrity, and as a human being."

The rapper goes on to say that he believes his highly publicized case will serve as a cautionary tale about the consequences of gang life, and discourage young people from affiliating with criminal organizations. He then reiterated accusations against his co-defendants, all whom are suspected Nine Trey members, stating they kidnapped him and stole thousands of dollars, and claimed one had a sexual relationship with the mother of his child. 6ix9ine suggested he was thankful that his crimes were brought to light and that he was ultimately put behind bars.

"I had a feeling of relief when I was arrested by the Government because I felt stuck, like the gang had control of my life and that I would never be able to escape their grip. I needed to do something before it was too late," he continued.

6ix9ine also said he was remorseful not because he got caught, but because of his illegal activity. The rapper then apologized to his fans, family, and the victims who were affected by his crimes.

"I'm truly sorry for the hard that I've cause," he wrote. "If given a second chance, I will not let this Court down and I will dedicate a portion of my life to helping others not make the same mistakes that I've made."

You can read the full letter here.

6ix9ine pleaded guilty to nine counts of racketeering, firearms offenses, and drug trafficking back in February. The Brooklyn rapper is facing a minimum of 47 years behind bars, but prosecutors have requested a reduced sentence due to his cooperation with authorities. 6ix9ine is scheduled to be sentenced on Dec. 18.