The Supreme Court ruled yesterday that cities cannot arbitrarily prevent people suspected of being gang members from loitering in public, striking down a controversial approach to making neighborhood streets safe.

In a case of great significance for today's community policing efforts, the court declared a Chicago anti-loitering ordinance unconstitutional by a 6 to 3 vote, because it failed to draw a line between innocent and sinister lingering or to give police clear guidance on which groups officers should disperse.

The Chicago dispute has been closely watched by communities nationwide that are making aggressive efforts to change the conditions that foster drive-by shootings, drug dealing and other gang crimes. Numerous states -- including Maryland and Virginia -- as well as city and county groups had sided with Chicago in asking the justices to uphold the 1992 ordinance.

Under the ordinance, an officer who saw someone whom he "reasonably believe[d]" to be a gang member hanging out in public with someone else was required to order the people to move on. Anyone who did not obey could be arrested and punished with a fine up to $500 or six months in prison. Police regulations implementing the law told officers to rely on their experience to identify probable gang members, and to look for distinctive colors, tattoos, signs and signals.

In just three years of enforcement, the law had led police to order the dispersal of 89,000 people on Chicago streets and to arrest some 42,000 who refused to move on.

The contentious case generated a total of six separate opinions by the justices. Writing for the court in striking down the law, Justice John Paul Stevens, a Chicago native, observed, "It matters not [under the ordinance] whether the reason that a gang member and his father . . . might loiter near Wrigley Field is to rob an unsuspecting fan or just to get a glimpse of Sammy Sosa leaving the ballpark."

In a dramatic gesture indicative of the discord provoked by the case, Justice Antonin Scalia delivered portions of his dissent from the bench, lashing out at the majority and declaring that a city has a right to try to control the gangs that hold neighborhoods hostage. Justice Clarence Thomas, in a written dissent signed by Scalia and Chief Justice William H. Rehnquist, said he feared the court had "sentenced law-abiding citizens to lives of terror and misery."

Like the curfew laws now being challenged in the District and elsewhere, the loitering ordinance reflects government efforts to prevent gang intimidation and associated vandalism and violence before it occurs. The approach addresses concerns that some urban residents do not feel safe on their own sidewalks. But such preventative ordinances have been criticized for targeting minorities and constituting a return to the street sweeps of the 1960s.

In yesterday's case, the American Civil Liberties Union, representing youths arrested under the law and backed by neighborhood activists and coalitions for the homeless, had argued that the law restricted personal freedom.

The Illinois Supreme Court had agreed in 1997, saying the ordinance was too vaguely worded and impinged on personal liberty. The state court noted that people's purposes are not always apparent: Suspected loiterers may in fact be waiting for a cab, ducking a rain shower or minding their business in another fashion not immediately obvious.

Affirming the state court's ruling in Chicago v. Morales, yesterday's majority agreed that the law was impermissibly vague, but splintered in their constitutional explanations. Stevens, joined by Justices David H. Souter and Ruth Bader Ginsburg, recognized a freedom to loiter as part of the "liberty" protected by the 14th Amendment's due process guarantee. "[A]n individual's decision to remain in a public place . . . is . . . part of his liberty," Stevens wrote.

Sandra Day O'Connor and Stephen G. Breyer did not go as far, writing that the ordinance was unconstitutionally vague because it lacked sufficient standards to guide police. They said cities still can target loitering gang members as long as they focus on people intending to do harm. They suggested a law aimed at those whose purpose is "to establish control over identifiable areas, to intimidate others from entering those areas, or to conceal illegal activities." Anthony M. Kennedy, the sixth member of the majority, also declined to recognize the freedom to loiter, but stressed that the ordinance affects a broad range of innocent conduct that should not be subject to a police officer's dispersal order.

Chicago officials seized on the statement by O'Connor and Breyer, saying they would try to rewrite their law. "The road map they have provided gives state and local governments, for the first time, a legal avenue to address the terrible problems that communities face when gangs take over the public ways," Brian L. Crowe, the city's corporation counsel, said in a statement.

Harvey Grossman, legal director of the ACLU of Illinois, said the ruling rightly stops police from arbitrarily selecting people for arrest. He called the opinion a victory for "young men of color" who made up the majority of those arrested under the ordinance between 1992 and 1995, when lower courts put the law on hold.

But Thomas, writing for the dissenters, suggested that the urban poor, including minorities, would suffer as a result of the ruling. "Today, the court focuses extensively on the `rights' of gang members and their companions," wrote the court's only black justice. "It can safely do so -- the people who will have to live with the consequences of today's opinion do not live in our neighborhoods."

The Court's Ruling

The Supreme Court struck down a Chicago anti-loitering ordinance that allowed police to order suspected gang members and their friends to move along.

The Majority

* John Paul Stevens

* Sandra Day O'Connor

* Anthony M. Kennedy

* David H. Souter

* Ruth Bader Ginsburg

* Stephen G. Breyer

"The vagueness that dooms this ordinance is not the product of uncertainty about the normal meaning of `loitering' but rather about what loitering is covered by the ordinance and what is not."

-- Stevens

The Dissent

* Antonin Scalia

* William H. Rehnquist

* Clarence Thomas

"The citizens of Chicago have decided that depriving themselves of the freedom to `hang out' with a gang member is necessary to eliminate pervasive gang crime and intimidation."

-- Scalia