CHICAGO -- Celebrity lawyer Michael Avenatti pushed his way into the R. Kelly sex abuse case proclaiming that he was representing two of the accusers but on Tuesday it became clearer that he may be involved in a way he didn't anticipate: as a witness.

At a court hearing, Kelly's attorney reiterated his demand for any communications between Avenatti and Cook County State's Attorney Kim Foxx's office regarding the R&B star. He said he continues to wait for prosecutors to provide him with a copy of the videotape that Avenatti said he turned over to them that allegedly shows Kelly having sex with an underage girl.

“Everyone treats him like a lawyer in this case (but) he's a witness, so treat him like a witness,” Steve Greenberg told news reporters after Tuesday's hearing. “He says he's got this tape (so) he's a chain of custody witness.”

The judge told Greenberg he needs to know specifically what the lawyer wants from prosecutors and why the material is important in his defence of Kelly. He ordered the attorneys to return to court on June 26.

Avenatti, who represented porn actress Stormy Daniels in her legal battles against President Donald Trump, told The Associated Press in a phone interview that he doesn't understand what Greenberg is doing, especially given that texts and emails between him and Foxx were made public last month. He said the only way Greenberg could help Kelly is if he somehow convinced a judge or jury that Avenatti “doctored” the videotape. Avenatti called that “ludicrous.”

“If Steve Greenberg is hanging his defence of R. Kelly on Michael Avenatti, R. Kelly better start preparing to spend the rest of his life in prison,” said Avenatti, who faces unrelated charges of embezzlement and extortion in California and New York.

Also at the brief hearing, Greenberg said prosecutors have turned over bank records as well as documents related to two of the singer's accusers. He said among them are documents showing what he called efforts to extort Kelly.

Greenberg later told reporters that he had not reviewed all the documents yet.

Kelly, who was charged in February with 10 counts of sexual abuse pertaining to three girls and one woman, is due back in family law court on Wednesday in his child support case. It is unclear what will be discussed at that hearing because the judge won't let the media attend those hearings and has prohibited attorneys from speaking about the case.

After being arrested on the sex abuse charges and posting bond, Kelly was sent back to jail for failure to pay child support. He remained in jail for three days until someone paid the more than $160,000 he owed in back child support to his ex-wife.

Another hearing involving a civil lawsuit filed by one of the accusers in the criminal case also is scheduled for Wednesday.

On Tuesday, an attorney who represents Kelly on entertainment matters said Kelly is in the process of lining up singing dates both inside and outside of Illinois. The lawyer, Doug Anton, said he expects the judge in Kelly's criminal case, who must sign off on any appearances outside of the court's jurisdiction, to allow the singer to travel to make a living.

Kelly had planned a trip to perform in April in Dubai, but it was called off.