A State Supreme Court judge on Wednesday rejected a bid by local police unions to toss out the Community Safety Act.
The law allows the public to sue the NYPD for racial profiling stemming from their stop-and-frisk policy.
Union officials tried to block it, arguing lawmakers don't have the authority to regulate law enforcement procedures.
But a State Supreme judge sided with the city, saying the law doesn't prevent officers from carrying out the practice, but only prohibits them from making stops based on race.
In a statement, a spokesperson for the New York Civil Liberties Union said, "This decision is a victory for all New Yorkers, including the police because it builds trust and respect between officers and the communities they serve."
In a statement, Patrolmen's Benevolent Association President Patrick Lynch said, "We strongly disagree with the judge’s decision and we intend to appeal it. This law sends an extremely bad message to our police officers who will see themselves in legal crosshairs with every arrest they make. Potentially, this bad law can have a very serious impact on public safety."