The Supreme Court, giving local governments broad protection from civil rights lawsuits, ruled yesterday that cities can be held liable only if the rights violations were the result of officially sanctioned policies.

The 7-to-1 ruling came in the case of James H. Praprotnik, a midlevel official in St. Louis, who claimed that he was wrongly transferred, demoted and then laid off because he successfully appealed an effort to suspend him for 15 days.

A jury absolved several of Praprotnik's superiors but found that the city had retaliated unconstitutionally against Praprotnik for exercising his First Amendment rights. In 1986, a federal appeals court upheld the verdict and award of $15,000 in damages.

The high court, in a plurality opinion by Justice Sandra Day O'Connor, reversed, saying that, to collect damages from the city, Praprotnik had to prove "the existence of an unconstitutional municipal policy" to retaliate against persons who won personnel appeals.

Yesterday's ruling in City of St. Louis v. Praprotnik is the court's fifth attempt since 1985 to define circumstances under which a city may be held liable for civil rights violations allegedly committed by its officials.

The court, with new Justice Anthony M. Kennedy not voting, again was unable to muster a five-vote majority for a single view, which makes it likely that the court will review it again.

But seven justices agreed that the appeals court ruling went too far in exposing a city to damage suits based on actions of officials who, while relatively senior supervisors, were not in the highest levels of policymaking for personnel matters.

O'Connor, joined by Chief Justice William H. Rehnquist and Justices Byron R. White and Antonin Scalia, said the city's final authority for personnel disputes was its Civil Service Commission, which has not ruled on some of Praprotnik's allegations.

Justice William J. Brennan Jr., joined by Justices Thurgood Marshall and Harry A. Blackmun, concurred, saying it appeared that any improper retaliatory actions were more an abuse of discretion by supervisors than official policy. But Brennan said O'Connor's view went too far, virtually closing the door to suits.

Justice John Paul Stevens, in dissent, said the city should be held liable because those who allegedly wronged Praprotnik included officials "directly under the mayor, agency heads and possibly the mayor himself."