The Pennsylvania judge who presided over Bill Cosby's sexual assault trial is releasing the identities of the jurors who deadlocked in the case.

Judge Steven O'Neill ruled Wednesday that the jurors' names should be made public. He said jurors may not discuss what other jurors said during deliberations.

A mistrial was declared Saturday in Cosby's sex assault trial after the jury deadlocked. O'Neill plans to hold a retrial within four months.

Lawyers for news outlets had argued that jurors' names should be public to ensure transparency in the judicial process. Prosecutors and defence lawyers had argued they should remain secret, saying releasing them would make it more difficult to select a jury in Cosby's second trial.

Cosby denies drugging and molesting Canadian accuser Andrea Constand at his home in 2004.