A judge on Friday postponed the sex crimes trial of Harvey Weinstein until September.

The trial of the disgraced movie mogul had been due to begin in New York on 3 June.

Judge James Burke barred the public and the press from Weinstein’s court appearance on Friday morning, after both prosecutors and defense lawyers asked for the hearing to be held in secret.

Burke ejected reporters and spectators from the courtroom in Manhattan as prosecutors argued that more accusers should be allowed to testify in the trial – which later in the afternoon was postponed until 9 September.

The allegations against Weinstein to be discussed at the hearing are “highly inflammatory”, Burke said, and letting the public in would “result in a violation of both the defendant’s right to an impartial jury panel and his right to a fair trial”.

“The publication of this information at this time would serve no purpose other than to arouse negative public sentiment toward the defendant,” he said, adding it would have a “devastating effect” on Weinstein’s ability to get a fair trial.

The former movie mogul faces charges of rape and sexual assault in New York, where authorities say he raped one female acquaintance and forced oral sex on another woman.

More than 80 women have publicly accused Weinstein of sexual misconduct. At Friday’s hearing, prosecutors and defense lawyers argued over whether evidence of uncharged crimes and other bad acts can be used at his trial.

News organizations argued for the hearing to be held in public – saying allegations against Weinstein are already so well known that airing them in open court would not hurt his ability to get a fair trial.

“This criminal case is a matter of immense and legitimate public interest,” said attorney Robert Balin, who represented several news organizations. “That is what our constitution envisions, that the people observe and participate in our criminal proceedings.”

Lawyers for the press attempted an emergency appeal, as the hearing went on behind closed doors.

Weinstein denies all allegations of non-consensual sex. His lawyer Marianne Bertuna argued it was right to hold the hearing in secret.

“We are trying to prevent tainted information from going to the press, only to be instantly released to the public, permanently destroying Mr Weinstein’s constitutional right to choose from a jury of his peers,” she said. “Let’s limit the damage that’s been done here in the midst of an insatiable media frenzy.”

Outside the courthouse on Friday, the attorney Gloria Allred also spoke in favor. She represents one of the women Weinstein has been charged with assaulting, and another accuser who may testify.

“This decision is protective of my potential client, unless or until she testifies. It’s the right decision for my client, who has not at this point revealed that she is a potential witness,” she said.

After the closed-door hearing, which went on nearly four hours, the judge set a new trial date and also denied a motion by defense lawyers to access the phones of one of the alleged victims. They wanted access because of allegations a detective told the woman to delete material from her phones, but prosecutors called the material irrelevant.

Jose Baez, an attorney for Weinstein, said an attempt to have other accusers testify is generally “a sign of a good, strong case for the defense”.

“The prosecution can’t prove their case…so they want to go outside of those witnesses and try to tack on and throw what you can against the wall and see what sticks,” he said.

Hazar Kilani contributed to this report.