Harvey Weinstein's rape trial took a dramatic turn as the judge threatened to revoke his bail and jail the former film producer after catching him using his mobile phone just as jury selection got under way.
"Is this really the way you want to end up in jail for the rest of your life, by texting and violating a court order?"
Judge James Burke asked the 67-year-old defendant, visibly angry. He told Mr Weinstein not to answer.
Assistant District Attorney Joan Illuzzi, the lead prosecutor, urged Judge Burke to jail Mr Weinstein.
"There is a grave risk that this defendant at some point will realise that the evidence against him is imposing and overwhelming" and he will try to flee, she said.
The judge ultimately decided not to jail Mr Weinstein, but warned he would not get another chance.
"I'm not looking for apologies; I’m looking for compliance," Judge Burke said.
Mr Weinstein has been released on bail, but is required to wear an electronic-tracking device that was visible on his ankle as he got out of a sports utility vehicle when he arrived at court.
Mr Weinstein has pleaded not guilty to charges of assaulting two women in New York. He faces life in prison if convicted on the most serious charge, predatory sexual assault.
Yesterday, hours after Mr Weinstein's trial in New York started, Los Angeles District Attorney Jackie Lacey charged him with the sexual assault of two unidentified women in 2013.
More than 80 women have accused Mr Weinstein of sexual misconduct dating back decades.
Mr Weinstein has denied the allegations, saying any sexual encounters he had were consensual.
One of his lawyers, Arthur Aidala, asked the judge to delay the trial or at least allow more time for jury selection because yesterday's charges would make it impossible to choose a fair and impartial jury this week.
"I cannot think of one time, one case where the day of jury selection this type of prejudice is being cast against a criminal defendant," said Mr Aidala, who held up copies of the New York Times, Daily News and New York Post with articles about the Los Angeles indictment.
"I don't see how anyone could answer honestly that they’re fair and impartial after this stuff is drilled into their brains," he said.
Judge Burke refused to delay the trial, saying the jury would be instructed that an indictment was not evidence of guilt.
The allegations against Mr Weinstein propelled the #MeToo movement, which led to men in politics and business being expelled from positions of power following accusations of sexual misconduct.
Prosecutors need all 12 jurors to back a conviction, while Mr Weinstein needs just one holdout for a hung jury.
The once-powerful film producer is known for reshaping film-making with low-budget, critically acclaimed films such as The English Patient and Shakespeare in Love.