ATLANTA (AP) — A judge in Atlanta has declined prosecutors' request to revoke Young Thug 's probation and send him to prison. But the judge cautioned him over his social media use after his viral post sparked an online backlash against the district attorney's office.

The Grammy Award-winning rapper pleaded guilty in October to gang, drug and gun charges and was released from jail. Fulton County District Attorney Fani Willis said in a court filing Wednesday that he "engaged in conduct that directly threatens the safety of witnesses and prosecutors, compromises ongoing legal proceedings, and warrants immediate revocation of probation."

Fulton County Superior Court Judge Paige Reese Whitaker said in an order Thursday that she had reviewed Willis' filing and a response by Young Thug's attorney and declined to revoke his probation.

“While the Court does not find that the cited social media post rises to the level of a violation of Defendant's probation, it may be prudent for Defendant to exercise restraint regarding certain topics,” Whitaker added in a footnote to her one-paragraph order.

Willis said Young Thug reposted a social media post that included a photo of an investigator in the district attorney's office with a caption that said the investigator is “the biggest liar in the DA's office.” The post “quickly went viral, amassing over 2 million views, with thousands of comments and retweets."

The investigator's home address and that of her parents were posted publicly, and some posts included threats to the investigator and her family, the filing says. One post threatened the assassination of Willis.

“I don't make threats to people I'm a good person," Young Thug posted Wednesday night on the social platform X. "I would never condone anyone threatening anyone or definitely participate in threatening anyone. I'm all about peace and love.”

Brian Steel, an attorney for Young Thug, said in a court filing Thursday that prosecutors' allegations were misleading and that the rapper hadn't done anything to violate his probation.

Young Thug, whose given name is Jeffery Williams, was indicted along with more than two dozen other people in May 2022, accused of violating Georgia's anti-racketeering law. The indictment said the rapper cofounded a violent street gang that committed multiple murders, shootings and carjackings over roughly a decade and promoted its activities in songs and on social media.

Whitaker gave him a total sentence of 40 years. The first five years were to be served in prison, but that was commuted to time served. Then he has 15 years on probation. Finally, a “backloaded” 20 years in prison will be commuted to time served if he complies with all of the conditions of his probation.

If the judge had granted the probation revocation, that 20-year prison sentence would have taken effect.

Prosecutors say the investigator whose photo Young Thug reposted is currently a witness in a “multi-defendant gang murder” case. A judge explicitly said during a hearing that the investigator was not to be shown on television while testifying, their filing says.

A blogger posted the investigator's photo on social media with the caption, “She doesn't want to be shown on screen? Well, here she is,” and Young Thug reposted that, prosecutors wrote.

Young Thug's “continued association with individuals actively involved in witness intimidation, threats of violence, and obstruction of justice” is a violation of the conditions of his probation, prosecutors wrote.

His lawyer wrote that there's no suggestion the rapper was aware of the judge's order not to show the investigator, and it's not a probation violation to repost an image on social media along with an opinion that the investigator “is untruthful.”

None of the “direct threats” cited by prosecutors are attributed to Young Thug.

The trial for Young Thug and five others began in November 2023 after it took nearly 10 months to seat a jury. The rapper and three other defendants pleaded guilty in October. A jury in November found the two remaining defendants in the trial not guilty of racketeering, murder and gang-related charges, although one of them was convicted on a gun charge.

Young Thug cowrote the hit "This is America" with Childish Gambino, which became the first hip-hop track to win the song of the year Grammy in 2019.