A judge in the United States has ruled that the New York Police Department's "stop and frisk" crime-fighting tactic is unconstitutional.
US District Judge Shira Scheindlin called the tactic "indirect racial profiling" because it targeted racially defined groups.
She said it resulted in the disproportionate and discriminatory stopping of tens of thousands of blacks and Hispanics while the city's highest officials "turned a blind eye".
"No one should live in fear of being stopped whenever he leaves his home to go about the activities of daily life," Ms Scheindlin wrote in her opinion.
But at a news conference after the ruling, Mayor of New York City Michael Bloomberg vowed to appeal the ruling.
"People also have a right to walk down the street without being killed or mugged," he said.
He repeated his conviction that the programme resulted in a drastic reduction in crime that made New York the "poster child" for safe US cities.
Mr Bloomberg has resisted interference in his police policies, especially that of stopping, questioning and frisking anyone for "reasonable suspicion" in high-crime areas.
The judge, who presided over the nine-week trial without a jury, ruled the effectiveness of "stop and frisk" was irrelevant.
"Many police practices may be useful for fighting crime - preventive detention or coerced confessions, for example - but because they are unconstitutional, they cannot be used, no matter how effective," the ruling said.
As part of her ruling, Ms Scheindlin ordered the appointment of an independent monitor and other immediate changes to police policies.
Her "remedies" address two lawsuits, one brought by the New York Civil Liberties Union (NYCLU) and the other by the Center for Constitutional Rights.
"Today is a victory for all New Yorkers," the Center for Constitutional Rights said in a statement.
"After more than 5 million stops conducted under the current administration, hundreds of thousands of them illegal and discriminatory, the NYPD has finally been held accountable.
"It is time for the city to stop denying the problem and work with the community to fix it."
Increase in stops since 2002
Police officers felt pressure to increase the number of stops after Mr Bloomberg took office in January 2002 and brought in Raymond Kelly to be NYPD commissioner, the judge wrote.
As a result, officers often frisked young minority men for weapons or searched their pockets for contraband before letting them go, in a violation of the Constitution's Fourth Amendment that protects against unreasonable searches and seizures, the judge said in her 195-page decision.
The number of stops rose to 685,724 in 2011 from 160,851 in 2003, with about half resulting in physical searches, a 2012 report by the New York Civil Liberties Union showed.
In 2011, there were more frisk searches of young black men than the number of these men living in the city, the report found.
Only 1.8% of blacks and Latinos searched by the police in 2011 had weapons on them, compared with 3.8% of whites, the NYCLU report said.
Mr Bloomberg and Commissioner Kelly countered that the practice has driven down violent crime and limited the number of illegal guns being carried on the streets.
Homicides fell from 649 in 2001 to 419 in 2012, the lowest number since records have been kept.
Other major felonies have fallen by similar proportions.