PORTLAND — A Maine judge who tried to tell reporters what they could and could not report on a criminal proceeding called the parties back to the courtroom on Wednesday to apologize.

Judge Jeffrey Moskowitz said Wednesday that he made a mistake in trying to limit reporting during a hearing Monday in which Anthony Sineni III, of Standish, was convicted of misdemeanor charges of assault and disorderly conduct on Monday.

“It’s certainly very clear to me that this particular order was not lawful,” he said.

The Portland Press Herald had defied the judge’s order, reporting that Sineni’s ex-girlfriend testified she had been a victim of domestic abuse.

Sineni entered a plea in which he didn’t admit any wrongdoing but acknowledged there was enough evidence to find him guilty to charges of assault and disorderly conduct. The charges could be dismissed in one to two years if Sineni stays out of trouble.

Moskowitz, who said he was concerned that the testimony could involve children, singled out a newspaper reporter for an apology and said he would make things right by issuing a transcript of witness testimony. He also said he was unsealing case files after granting the defendant’s request to seal them on Monday.

The judge’s original attempt to restrict reporting led to an outcry by First Amendment advocates. The newspaper’s lawyer said the decision was “100 percent wrong.”

“We’re gratified that Judge Moskowitz rescinded an order that was clearly unconstitutional. We defied the order in the first place because it was a clear violation of the First Amendment, which we will continue to defend vigorously,” managing editor Steve Greenlee said in a statement.