Preet Bharara, the United States attorney for the Southern District of New York and one of the most acclaimed prosecutors of his generation, is locked in what seems to be an escalating war of words with the federal judiciary — one that some judges fear could influence important rulings.

The tension was on ample display last week in a ruling in the public corruption case against the New York Assemblyman Sheldon Silver. The tone of the opinion left federal prosecutors seething, and the extended criticism of Mr. Bharara stunned even other judges. They fear that the same issues could surface in the related investigation of the leader of the New York State senate, Dean G. Skelos.

Mr. Silver’s lawyers moved to dismiss his indictment because Mr. Bharara had orchestrated a “media firestorm” that tainted their client’s right to a fair trial. Such motions are considered long shots, but Judge Valerie Caproni of Federal District Court in Manhattan wrote that Mr. Silver had a legitimate argument that the case should be thrown out because Mr. Bharara, “while castigating politicians in Albany for playing fast and loose with the ethical rules that govern their conduct, strayed so close to the edge of the rules governing his own conduct.”

Judge Caproni ultimately sided with the government, so there’s no way of knowing how close she came to tossing the indictment. But the possibility she even seriously considered such a step has set off alarms among some of her fellow judges. Judge Caproni herself acknowledged that dismissing an indictment is a “drastic remedy” that is “rarely used.” She also noted that the motion was not a disciplinary proceeding against Mr. Bharara. That didn’t stop her from spending a good part of the opinion questioning his ethics and chastising him for his public comments about the case.