A federal appeals court on Thursday halted a sweeping set of changes to the New York Police Department’s practice of stopping and frisking people on the street, and, in strikingly personal terms, criticized the trial judge’s conduct and removed her from the case.

The Court of Appeals for the Second Circuit ruled that the judge, Shira A. Scheindlin, “ran afoul” of the judiciary’s code of conduct by compromising the “appearance of impartiality surrounding this litigation.” The panel criticized how she had steered the lawsuit to her courtroom when it was filed nearly six years ago.

The ruling effectively puts off a battery of changes that Judge Scheindlin, of Federal District Court in Manhattan, had ordered for the Police Department. It postpones the operations of the monitor who was asked to oversee reforms of the stop-and-frisk practices, which Judge Scheindlin had said violated the constitutional rights of minorities.

The appeals court’s action was an unexpected twist to what has been a long-running fight over the tactics, a centerpiece of the city’s crime-fighting strategy.