A federal judge Thursday allowed jailed R&B singer R. Kelly to shake up his legal defense team just weeks before he is set to go on trial in New York on racketeering charges.

U.S. District Judge Ann Donnelly granted a request by Kelly's top two attorneys, Steve Greenberg and Michael Leonard, of Chicago, to withdraw from the high-profile case amid a falling-out among Kelly's team of lawyers. Greenberg and Leonard told the judge it would be "impossible" for them to continue representing Kelly.

R. KELLY'S SEX-TRAFFICKING TRIAL PUSHED TO AUGUST 18, JUDGE ADMONISHES LAWYERS FOR ‘MUDSLIDING’

Thursday's hearing came as attorneys continued with final preparations for Kelly's long-delayed sex trafficking trial, scheduled to begin Aug. 9 in Brooklyn federal court.

The Grammy-winning, multiplatinum-selling R&B singer is charged with leading an enterprise of managers, bodyguards and other employees who helped him recruit women and girls for sex. Federal prosecutors say the group selected victims at concerts and other venues and arranged for them to travel to see Kelly.

CLICK HERE TO GET THE FOX NEWS APP

The case is only part of the legal peril facing the singer, born Robert Sylvester Kelly. He also has pleaded not guilty to sex-related charges in Illinois and Minnesota. He denies ever abusing anyone.