NEW YORK — New York City will stop challenging a law making it easier to bring racial profiling cases against the police, Mayor Bill de Blasio said Wednesday, furthering his pledge to change the tenor of policing in the nation's largest city.

The new mayor is abandoning a lawsuit over the measure weeks after deciding to drop the city's appeal of a federal court order for changes to the New York Police Department's use of the stop and frisk tactic. In both cases, he reversed former Mayor Michael Bloomberg's positions on what he saw as public safety imperatives.

The decisions mark a sizable move toward resolving major court fights over the NYPD's practices, but a police union plans to press on with its own suit against the anti-profiling law, and some other significant cases remain open.

De Blasio campaigned on promises to improve relations between police and residents, particularly minorities, who complained of heavy-handed treatment.

"There is absolutely no contradiction in protecting the public safety of New Yorkers and respecting their civil liberties. In fact, those two priorities must go hand-in-hand," de Blasio said in a statement Wednesday.

Passed last summer over Bloomberg's veto, the anti-profiling law eases some legal standards for claims that stop and frisk or other techniques were used in a discriminatory way. The suits could seek only policy changes, not money.

The law reflected concerns about the NYPD's use of stop-and-frisk and its surveillance of Muslims. The spying was disclosed in stories by The Associated Press.

Bloomberg vigorously defended the surveillance and stop and frisk as legal, needed and effective tools to keep the city safe, and he said the anti-profiling law would ensnare police in second-guessing and lawsuits. He sued the City Council, and police unions joined the fight.

The Patrolmen's Benevolent Association filed its own suit. President Patrick Lynch said Wednesday the rank-and-file officers' union would "continue the litigation to protect our police officers and the city from the effects of this misguided law."

The union has argued the law would endanger officers by making them hesitant to use stop and frisk and other techniques. The city's chief lawyer, Zachary Carter, says the city will defend police officers who act according to the department's guidelines.

City Council Speaker Melissa Mark-Viverito and the law's sponsors, Councilmen Brad Lander and Jumaane Williams, hailed de Blasio's decision to drop the suit, as did the Rev. Al Sharpton and other civil rights advocates.

"This law — along with other steps the administration and the NYPD are taking — will help reverse the damage done," the Council members said in a statement.

De Blasio and Police Commissioner William Bratton recently unveiled new training guidelines advising police to introduce themselves and "be patient," among other things. And the city is working toward a settlement with civil liberties groups that brought the federal lawsuit challenging the NYPD's stop and frisk practices.

While the Supreme Court has said the technique itself is constitutional, a federal judge said the way the NYPD used it discriminated against black and Hispanic men, and she ordered a court-appointed monitor and other changes. Police unions may ask a court to let them continue appealing that ruling, even though the city has bowed out.

The city still faces suits assailing the Muslim surveillance program and police practices in schools, not to mention individual claims of police mistreatment.

Still, to civil rights advocates, Wednesday's development represents "huge progress," said Donna Lieberman, the executive director of the New York Civil Liberties Union.

Copyright 2014 The Associated Press

Copyright 2015 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.