NEW YORK (AP) — Rapper Tekashi 6ix9ine is testifying against two reputed members of a violent New York City street gang.

The rapper took the witness stand on Tuesday as part of a cooperation agreement with federal prosecutors. He admitted in a guilty plea earlier 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 having a falling out with him. 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.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.