Mayor de Blasio said Wednesday that the city will stop challenging a law making it easier to bring racial-profiling cases against the police, furthering his pledge to change the tenor of ­policing.

De Blasio 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 NYPD’s use of stop-and-frisk. 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 civilians, particularly minorities.

“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.