New York City Mayor Michael Bloomberg and Police Commissioner Ray Kelly expressed a sense of shock and disgust when they realized they didn’t get their way.

Welcome to New York. Life isn’t always fair.

On Monday, a federal court found that the New York Police Department’s current implementation of their stop-and-frisk policy is unconstitutional. In Judge Shira Sheindlin’s ruling, which amounts to 198 pages, she found that the NYPD violated New Yorkers’ Fourth Amendment rights to be free from unreasonable searches and seizures. Sheindlin also found that stop-and-frisk was racially discriminatory and in violation of the Equal Protection Clause of the 14th Amendment.

Sheindlin’s solutions involved ordering a court-appointed monitor to oversee reforms, and she also ordered a joint remedial process that will solicit input from a variety of stakeholders, including the communities most affected by stop-and-frisk.

“[The city has] received both actual and constructive notice since at least 1999 of widespread Fourth Amendment violations occurring as a result of the NYPD’s stop-and-frisk practices,” read part of the ruling. “Despite this notice, they deliberately maintained and even escalated policies and practices that predictably resulted in even more widespread Fourth Amendment violations. … The NYPD has repeatedly turned a blind eye to clear evidence of unconstitutional stops and frisks.”

Darius Charney, a senior staff attorney at the Center for Constitutional Rights (CCR), claimed victory for the majority of New Yorkers.

“This historic victory is the result not only of our 14 years of litigation, but of decades’ worth of efforts by activists, grassroots and legal organizations, and affected communities,” said Charney during a news conference at CCR headquarters on Monday. “The NYPD is finally being held to account for its longstanding illegal and discriminatory policing practices. The city must now stop denying the problem and partner with the community to create a police department that protects the safety and respects the rights of all New Yorkers.”

Back in 2011, the NYPD reported a 600 percent increase in stops (685,724) since Ray Kelly took over as commissioner in 2002. Out of those stops, 84 percent were Black or Latino, and 88 percent of the people stopped weren’t arrested or received summons. According to the CCR, weapons and contraband were recovered less than 2 percent of the time.

The ruling ends a 10-week trial that started in late May. Floyd v. City of New York was a class-action lawsuit brought by CCR and the law firms of Beldock, Levine and Hoffman and Covington & Burling, LLP.

Activists, unions and those on the 2013 campaign trail were quick to comment on the federal court ruling. “The Bloomberg administration’s discriminatory policing practices and failure to adequately understand the problems they create have brought us to this point, and we are pleased that justice has prevailed,” said Joo-Hyun Kang of Communities United for Police Reform. “New Yorkers want change and leadership committed to policing that helps keep all communities safe, reduces gun violence and respects our fundamental rights. Bloomberg’s stop-and-frisk policy has failed to accomplish these objectives.”

Former police officer and current Brooklyn borough presidential candidate state Sen. Eric Adams threw his two cents in as well. “I am proud to have been a part of the lawsuit that brought about this necessary ruling—a ruling that should lead to fairer treatment of all New Yorkers,” he said. “I call on the NYPD and the Bloomberg administration to immediately comply with the judge’s orders, commit itself to educating officers to better protect the civil rights of the people they serve and begin working with the communities where stop-and-frisk was most abused so that the relationship between citizens and the police can be repaired.”

“Today’s federal ruling against stop-and-frisk is vindication for the hundreds of thousands of mostly African-American and Latino New Yorkers who for years have endured the humiliation of being arrested by the police based on unfounded and cryptic reasoning,” said 32BJ SEIU President Hector Figueroa.

“Today’s ruling by Judge Scheindlin declaring that police have overstepped their authority highlights the enormous flaws in the NYPD’s stop-and-frisk tactic, which has served to undermine trust between communities and law enforcement,” said New York City mayoral candidate City Comptroller John Liu.

Bloomberg and Kelly took the federal court to task during a news conference at City Hall, which took place at the same time CCR’s did. Together, they denounced the ruling, claiming that stop-and-frisk took guns off the street and saved lives.

“Throughout the trial that just concluded, the judge made it clear she was not at all interested in the crime reductions here or how we achieved them,” said Bloomberg. “In fact, nowhere in her 195-page decision does she mention the historic cuts in crime or the number of lives that have been saved. She ignored the real-world realities of crime, the fact that stops match up with crime statistics and the fact that our police officers on patrol—the majority of whom are Black, Hispanic or members of other ethnic or racial minorities–make an average about less than one stop a week.”

“Police stops are just one component of multiple efforts by the department that have saved lives and driven the murder rate to record lows,” added Kelly. “In the first 11 years of Mayor Bloomberg’s tenure, there were 7,363 fewer murders in New York City compared to the 11 years prior to the mayor taking office. And if history is any guide, those lives saved were overwhelmingly the lives of young men of color. Now, this didn’t happen by accident, it was a result of proactive policing supported by this mayor. There’s little question that police stops in this case continue to be deeply misunderstood.”

But Bloomberg and Kelly weren’t the only ones upset with the ruling. Republican mayoral candidate and former MTA Chairman Joe Lhota felt that the NYPD already had too much oversight and the change in how stop-and-frisk is practiced will derail the fight on crime.

“Our Constitution is a living document, and I disagree with some of Judge Scheindlin’s conclusions regarding the use of stop, question and frisk and the Fourth Amendment,” said Lhota in an emailed statement. “The NYPD is one of the most closely scrutinized law enforcement agencies in the country with oversight from New York City’s five district attorneys, two U.S. attorneys, the New York state attorney general and the City Council. The last thing we need is another layer of outside bureaucracy dictating our policing.”

Despite Bloomberg’s plan to appeal and some of the blowback, the majority of the reaction to stop-and frisk—as it’s currently practiced—being labeled unconstitutional was met with approval. During the news conference at CCR, New York City Council Member Jumaane Williams left Bloomberg and company with a remark that used their own measuring tools against them.

“Today, the Bloomberg administration and the NYPD learned a very old lesson that most of us learn in our formative years—the end rarely justifies the means,” said Williams. “Their own COMPSTAT statistics bear out that the current implementation of stop, question and frisk did little to get guns off the street and prevent gun violence.”