NEW YORK — A federal appeals court returned litigation over the New York Police Department’s stop-and-frisk policy to a lower court Friday for a potential settlement between civil liberties groups and the city.

The 2nd U.S. Circuit Court of Appeals also refused to let police unions replace the city to continue the appeal over a judge’s finding that police sometimes discriminate against minorities with the crime-reduction tactic.

The appeals court’s decision was issued weeks after the city withdrew its challenge to a court-appointed monitor and other steps in order to rewrite the stop-and-frisk policy, with new Mayor Bill de Blasio saying the city wanted to ensure there was no discrimination.

In a statement, the city’s law department said: “The court of appeals recognized the city’s interest in resolving the case, which we now intend to do in the district court.”