Tekashi 6ix9ine performs in concert at Hovet on Sept. 19, 2018 in Stockholm, Sweden.

Rapper Tekashi 6ix9ine is testifying against two reputed members of a violent New York City street gang.

The rapper took the witness stand Tuesday as part of an agreement with federal prosecutors.

He admitted in a guilty plea this year that he joined the Nine Trey Gangsta Bloods and helped try to kill a rival gang member.

One of the defendants, Anthony Ellison, is accused of kidnapping and robbing 6ix9ine last year after a falling-out. Ellison denies the charges.

6ix9ine’s decision to cooperate has upended his bad boy image on social media. Rap icon Snoop Dogg recently labeled him a “snitch.”

The 23-year-old rapper’s album “Day69: Graduation Day” was among the top sellers on iTunes following its release last year