Updated

A judge has sentenced rapper Tekashi 6ix9ine to two years in a racketeering case, citing his cooperation with prosecutors, Fox News confirmed.

The Brooklyn rapper, whose real name is Daniel Hernandez, previously pleaded guilty to racketeering and agreed to cooperate with law enforcement. He testified against several members of his Nine Trey Gangsta Bloods gang, which led to other arrests.

“Your cooperation was impressive. It was game changing. It was complete and it was brave,” said U.S. District Judge Paul Engelmayer as he announced the sentence, which is far lower than federal guidelines for the crimes, in a Manhattan courtroom.

But the judge said the amount of time the rapper has spent in prison was not enough for the violence of his crimes. He noted that many artists sing about organized crime, citing Bruce Springsteen's “Murder Incorporated.”

Tekashi 6IX9INE was sentenced to two years in prison.

Tekashi 6IX9INE was sentenced to two years in prison. (Photo by Arik McArthur/FilmMagic)

“You, Mr. Hernandez, essentially joined Murder Incorporated," Englemayer said.

Prior to his cooperation with police, Tekashi was facing decades in prison for his involvement with the gang and the crimes.

Before his sentencing Wednesday, Tekashi 6ix9ine expressed regret for joining the gang, apologizing to his family, his fans and the victims in the case.

RAPPER TEKASHI 6IX9INE’S MOM SAYS SON HAS A ‘BIG HEART,’ BEGS JUDGE TO 'HAVE MERCY' AHEAD OF SENTENCING

“I'm not a victim. I put myself in this position from Day One,” Tekashi 6ix9ine said, breaking down shortly after when he spotted his biological father whom he says he hasn't seen since the 3rd grade in the courtroom.

He then read from a lengthy letter, saying, “I made a lot of bad choices in life, but that does not make me a bad person.”

The Brooklyn-based rapper, whose legal name is Daniel Hernandez, pleaded not guilty to racketeering and firearms charges.

The Brooklyn-based rapper, whose legal name is Daniel Hernandez, pleaded not guilty to racketeering and firearms charges. (AP)

He expressed similar remorse for his actions in a letter he wrote last week to Engelmayer, discussing the relief he felt when he was arrested and his plan to make amends by warning others not to follow in his path.

“I'm happy that the public was able to witness me dealing with the consequences of my actions because I feel like it sheds a light on what can come from gang affiliation," he wrote.

In a pre-sentencing letter to the judge, prosecutors said his “cooperation was extraordinary” and was “both incredibly significant and extremely useful,” enabling them to charge additional individuals. His Feb. 1 guilty plea prompted nearly all of the other defendants to begin plea negotiations, prosecutors said.

"The government believes that his cooperation was not only substantial, it was extraordinary," Assistant U.S. Attorney Michael Longyear said at the hearing Wednesday, noting the risks Hernandez and his family faced for his testimony.

Tekashi said during the plea that he joined the gang in 2017.

TEKASHI 6IX9INE’S GIRLFRIEND TAKES HEAT FOR HUGE TATTOO OF RAPPER ON HER CHEST

“On or about June 2, 2018, in furtherance of Nine Trey, of the Nine Trey enterprise, I paid a person to shoot at a rival member of Nine Trey to scare him. The shooting took place in Manhattan,” he told a judge at the time, according to Page Six.

“I did this to maintain or increase my own standing in Nine Trey. In furtherance of this shooting, I knew that a member of Nine Trey discharged a gun,” Tekashi added.

Tekashi 6ix9ine was hanging out at an infamous Queens strip club before he got held up this weekend, The New York Post reported.

Tekashi 6ix9ine cooperated with law enforcement after being arrested for his gang involvement. (6ix9ine/Twitter)

The “STOOPID” rapper also admitted to helping members of the gang kill a rival gang member in March 2018 as well as taking part in an April 2018 robbery at gunpoint. He also told investigators that he sold a kilo of heroin in 2017, the year he allegedly joined the gang.

In total, he pleaded guilty to nine felonies including racketeering conspiracy, firearms charges, narcotics trafficking, and violent crimes in aid of racketeering.

Prior to his arrest, TMZ reports that law enforcement believed his life was in danger after an appearance on “The Breakfast Club” in which he accused members of his inner circle of turning on him. When authorities learned he was planning a trip to a Connecticut casino, he was taken into custody for fear that an attempt on his life was imminent and could put innocent people in danger.

Prosecutors have described Nine Trey as one of the most violent outgrowths of United Bloods Nation, with members throughout the country. Tekashi 6ix9ine relocated his family before his cooperation became publicly known and then he was moved to a different prison facility and a unit with no gang members, the government said.

His cooperation might make him eligible for a witness protection program, though his distinctive facial tattoos — including a large "69" on his forehead — could make concealing his identity challenging.

CLICK HERE TO GET THE FOX NEWS APP

“There is no question that the defendant’s life will never be the same because of his cooperation in this case. He and his family will have to take extra safety precautions when being in public so as to avoid potential reprisals from others,” prosecutors wrote in the letter.

The Associated Press contributed to this report.