At 88, Judge Weinstein is one of the longest serving members of the federal bench. Supporters praise his taking unusual actions in pursuit of his notions of justice, like for a time refusing to handle drug cases out of opposition to mandatory minimums. Critics say that in the process, he disregards the law.

(On Thursday, he made headlines by refusing to dismiss a lawsuit by a public school teacher removed from the classroom for allowing students to use vulgarities during a lesson on H.I.V. He ruled that she appeared to have followed the spirit of a state syllabus that directed that students be encouraged to use sexual terms they understood.)

“Jack is somebody who will step out and do what he thinks is right and take his chances of being overturned by an appeals court,” said John S. Martin, who cited his disagreement with mandatory sentences when he retired from the federal bench in Manhattan. “He sees the injustice in these things, and he tries to do something about it.”

Both sides point to his efforts in the Polizzi case as quintessential Weinstein.

In 2005, Mr. Polizzi signed up for a child pornography Web site. He began obsessively stockpiling thousands of images, mostly of prepubescent girls. When F.B.I. agents arrived with a search warrant, he led them to the two-story garage where he kept his collection behind locked doors, saying, “The pictures of the children are upstairs.”

Child pornography cases almost always end with guilty pleas. But when the case was assigned to Judge Weinstein, Mr. Polizzi’s lawyer recommended that he go to trial. The lawyer used an insanity defense, claiming Mr. Polizzi had been repeatedly raped as a child and had collected the pictures not for sexual gratification, but in hopes of finding evidence of his own abuse — claims the prosecution dismissed as implausible. When the first of the images were shown in court, Mr. Polizzi collapsed and was taken to a hospital.

The jury was given the standard instruction not to consider possible punishment during deliberations. After three days, on Oct. 5, 2007, Mr. Polizzi was convicted of all 12 counts of receipt of child pornography and 11 counts of possession. Then Judge Weinstein broke from the script with a question almost never posed in court: If the jurors had known about the minimum prison sentence, would they have voted to convict?

Five jurors spoke up against imprisonment. Two said they would have changed their votes. Judge Weinstein tossed out the guilty verdict on the more serious receipt counts and ordered a new trial. He sentenced Mr. Polizzi to a year in prison for the possession counts, which Mr. Polizzi has served.