The judge overseeing the racketeering and gang case against Atlanta rapper Young Thug and others has ordered an investigation into the leak of a video that shows a state's witness offering information in exchange for leniency.

Jury selection in the high-profile trial began nearly two months ago and is likely to continue for several more months, The Atlanta Journal-Constitution reported. Fulton County Superior Court Chief Judge Ural Glanville, on Wednesday reminded prosecutors and defense attorneys that certain evidence must be kept secret until the trial, the newspaper reported.

"It affects everyone’s right to a fair trial," the judge told attorneys. "I don’t know who did this but if this pertains to you, please amend your ways. You’re playing a very dangerous game with your six-digit bar number."

SARAH, DUCHESS OF YORK, STANDS BY PRINCE ANDREW, SAYS SHE WAS 'THE MOST PERSECUTED WOMAN' IN THE ROYAL FAMILY

The trial for Young Thug and 13 others is expected to last six to nine months. Prosecutors have said the rapper is a founder of a criminal street gang called Young Slime Life, or YSL, and that he and others have committed numerous crimes to further the gang's interests. Defense attorneys have said YSL is simply a record label, Young Stoner Life, and that their clients did no wrong.

The video of a 2021 interview that was posted online about two weeks ago shows a witness offering to provide information in the investigation into Young Thug in exchange for leniency, the newspaper reported.

Young Thug GA case

Young Thug, whose real name is Jeffery Williams, is seen at a hearing in Atlanta, Georgia, on Dec. 22, 2022. The judge overseeing the case has ordered an investigation after a video of an interview with a witness was posted online.  (Arvin Temkar/Atlanta Journal-Constitution via AP, File)

Gina Bernard, an attorney representing defendant Jayden Myrick, filed a motion seeking a mistrial. She wrote that this, along with publicity and other "courtroom incidents" since the start of the trial "make it impossible" for her client to receive a fair trial.

In response, prosecutors alleged that the defense leaked the video, noting that it appeared online less than a month after it was given to defense attorneys.

ED SHEERAN WINS COPYRIGHT CASE OVER 2017 HIT ‘SHAPE OF YOU’

"The state has absolutely no interest in leaking this video to members of the public, as its dissemination serves only to intimidate and harass witnesses called upon by the state to testify in a very serious and high-profile case," prosecutors wrote. They said the leak has put their witness in danger, citing social media posts labeling him as a "rat" and a "snitch."

Another defense attorney said anyone could have gotten the video because prosecutors shared it using an unsecured link.

CLICK HERE TO GET THE FOX NEWS APP

The judge denied the motion for a mistrial but told both sides to be more careful about sharing evidence. He warned that if more evidence becomes public, he will only allow discovery evidence to be viewed in his chambers.

"For me to have to deal with this at this point in the trial is just unacceptable," he said.