A federal appeals court in Manhattan ruled on Tuesday that the district court judge presiding over a long-running lawsuit against the New York Fire Department claiming discrimination against minority applicants went too far in forcing the department to revamp its hiring process, and that he had raised enough doubts about his impartiality to require assigning a key part of the case to another judge.

But the appeals court also left in place many of the orders by the judge, Nicholas G. Garaufis, including a finding that previous tests used to screen applicants were biased against minorities, the appointment of a court monitor to track progress in hiring black and Hispanic firefighters and the awarding of retroactive pay to applicants who had been unfairly screened out in the past.

The decision came in an appeal filed by the city claiming that Judge Garaufis, whose rulings were notable for their aggressive criticism of city leaders, should be removed from the case because he had “lost any semblance of neutrality.”

Though the city did not dispute Judge Garaufis’s finding that the Fire Department’s entrance exams had a discriminatory impact, it argued that he was wrong when he declared that the discrimination was intentional, a finding he made after a preliminary hearing. The appellate court agreed and said the issue of whether the discrimination was intentional, which could force the city to pay more money in damages, must now go to trial under a different judge.