NEW YORK (Reuters) - A U.S. appeals court froze court-ordered reforms to the New York City Police Department’s controversial stop-and-frisk program and removed the judge who found the police tactic unconstitutional because she “ran afoul” of the judicial code of conduct.

Demonstrators hold signs protesting the New York Police Department's "stop and frisk" crime-fighting tactic outside of Manhattan Federal Court in New York, March 18, 2013. REUTERS/Lucas Jackson

The 2nd U.S. Circuit Court of Appeals ruling was at least a temporary victory for Mayor Michael Bloomberg and the NYPD, who have argued that stopping, questioning and frisking suspicious people has led to a steep decline in crime rates.

The three-judge panel said its ruling should have no impact on the merits of the case, but was a rebuke of Scheindlin, who became a hero of civil rights and civil liberties groups when, in August, she struck down parts of stop-and-frisk.

The court’s removal of U.S. District Judge Shira Scheindlin from the case was an exceedingly rare action and an indication of how displeased the judges were with her.

The judges faulted Scheindlin for failing to appear impartial by making public statements about the case and by granting media interviews in which she answered critics of her ruling.

“We could not be more pleased with the Court’s findings,” said Corporation Counsel Michael Cardozo, the city’s chief attorney, who called Scheindlin’s ruling “unjustified and deeply problematic.”

The case “will now receive a fresh and independent look both by the appeals court and then, if necessary, by a different trial court judge,” Cardozo said.

As part of her ruling, Scheindlin ordered a federal monitor to oversee changes to NYPD practices.

Her ruling was widely celebrated by racial minorities in New York who complained that innocent people were being caught up in the police sweeps.

It also played a role in the campaign for mayor of New York City in which candidate Bill de Blasio, who won the Democratic nomination and became the front-runner for next Tuesday’s election, blasted stop-and-frisk as unfair.

The appeals court also took issue with how Scheindlin interacted with lawyers in a December 2007 hearing while she presided over another stop-and-frisk lawsuit involving some of the same lawyers.

“If you got proof of inappropriate racial profiling in a good constitutional case, why don’t you bring a lawsuit?” Scheindlin asked. “What I am trying to say - I am sure I am going to get in trouble for saying it - for $65 you can bring that lawsuit.”

She said the lawyers could mark it as “related,” ensuring that it would be assigned to her docket rather than to another judge at random.

The New York Civil Liberties Union said it would appeal the ruling, and the Center for Constitutional Rights called the reassigning of the case “troubling and unprecedented.”

De Blasio, who said stop-and-frisk was evidence of “two New Yorks” - one for the privileged elite and another for the poor and disadvantaged - said he was “extremely disappointed in today’s decision.”

“We have to end the overuse of stop-and-frisk and any delay only means a continued and unnecessary rift between our police and the people they protect,” de Blasio said.

Police supporters applauded the ruling.

“That’s great news,” said former NYPD Commissioner Howard Safir. “Stop-and-frisk is a legal tactic, not a policy. What police are doing are stopping people based on victims’ descriptions” of perpetrators.

Heather MacDonald, author of the book “Are Cops Racist?” and a vigorous defender of the NYPD’s use of stop-and-frisk, also celebrated the ruling but said it was no indication the appeals court would overturn Scheindlin’s ruling.

“Appellate judges tend to take a deferential stance towards trial judges’ fact-finding, and that’s what a lot of this case hangs on,” Mac Donald said.