Atlanta rapper Young Thug, charged with criminal gang activity in Georgia, received drugs in a one-on-one exchange with a co-defendant during a court hearing Wednesday, prosecutors said.

The brazen act was caught on camera, according to a motion filed Thursday by Fulton County prosecutors.

The artist, whose real name is Jeffery Lamar Williams, was in court with co-defendant Kahlieff Adams when Adams walked unsupervised to where Young Thug was sitting with his lawyer and put something in his hand, according to the motion.

Young Thug then tried to hide his hand with the contraband, Percocet, under the table, prosecutors said.

A sheriff’s deputy noticed the exchange, approached Young Thug and seized Percocet’s bag, according to court documents.

Agents also searched Adams, who resisted, and found Percocet, marijuana, tobacco and other contraband «wrapped in plastic and seasoning to mask the odor of marijuana,» the motion says.

Adams was taken to a nearby hospital after he appeared to «ingest other contraband items he had with him in an effort to conceal the extent of his crimes within the courtroom,» according to the filing.

Adams is currently serving a life sentence in jail without parole for murder, prosecutors said in the filing.

The court was delayed after the interaction. Court documents described it as «unlawful acts of possession and distribution, respectively, of contraband within the Fulton County courthouse.»

Keith Adams, attorney for Young Thug, told the Atlanta Journal-Constitution the state’s motion is «replete with factual inaccuracies, embellishments, and attempts to hold Mr. Williams accountable for the actions of another person.»

«The bottom line of an investigation into the (Wednesday) incident was that Mr. Williams was not involved in any wrongdoing,» Adams said.

A lawyer for Kahlieff Adams, Teombre Calland, told the newspaper: “These indictments are just that: mere statements made by the State in an effort to thwart the length of the jury selection process. Mr. Adams firmly maintains his innocence and looks forward to the conclusion of this trial.»

NBC News has reached out to both attorneys for comment.

Young Thug, 31, a Grammy Award-winning artist and big name in the hip-hop world, was arrested in May. He was one of dozens of people charged in a sprawling indictment of violating Georgia’s Corruption and Gangster Influenced Organizations Act, or RICO Act, and engaging in criminal street gang activity, according to court documents.

Young Thug is alleged to be one of the three founding members of YSL, or «Young Slime Life,» which prosecutors say is a street gang formed in 2012 in Atlanta, according to the indictment. The indictment says that YSL claims to be affiliated with the national Bloods gang.