A federal judge on Tuesday ordered the New York Police Department to immediately stop conducting “stop and frisk” searches in the Bronx, ruling that the practice of stopping people suspected of trespassing outside private buildings in the borough is unconstitutional.

District Judge Shira Scheindlin in Manhattan issued the ruling in response to one of three lawsuits challenging the contentious policy. The case in question, Ligon v. City of New York, focuses on police stops in front of private residential buildings enrolled in the Trespass Affidavit Program in the Bronx.

Although the NYPD and Mayor Michael Bloomberg have publicly supported stop-and-frisk tactics, which they claim have lowered crime rates in the city, Scheindlin ordered the police department to stop conducting those searches in the Bronx without “reasonable suspicion” that an individual is engaged in criminal activity.

“While it may be difficult to say where, precisely, to draw the line between constitutional and unconstitutional police encounters, such a line exists, and the N.Y.P.D. has systematically crossed it when making trespass stops outside TAP buildings in the Bronx,” Scheindlin said, according to the New York Times. “For those of us who do not fear being stopped as we approach or leave our own homes or those of our friends and families, it is difficult to believe that residents of one of our boroughs live under such a threat. In light of the evidence presented at the hearing, however, I am compelled to conclude that this is the case.”

Just seeing a person enter or leave a building does not qualify as enough evidence to permit the police to stop someone, even if the building is located in a high-crime area, Scheindlin said. The court decision also ordered the NYPD to create a formal written policy that specifies the circumstances in which it is legally permissible to stop a person outside of a TAP building on suspicion of trespassing.

The plaintiffs in the case are all black and Latino residents. The New York Civil Liberties Union reports that innocent New Yorkers have been subjected to police stops and interrogations -- without reasonable suspicion -- more than 4 million times since 2002. Black and Latino communities are overwhelmingly the target of these searches, although the NYPD and Bloomberg administration deny there’s a racial component to the policy.

"With today's ruling, the federal court has stated loudly and clearly that a major part of the NYPD's stop-and-frisk program is unconstitutional and that the time has come for the courts to order a halt to illegal stops," Christopher Dunn, an associate legal director for the New York Civil Liberties Union, said in a statement in response to Tuesday’s ruling.