WASHINGTON (AP) _ States may make the death penalty the only possible punishment for some murderers without violating the Constitution's ban on mandatory death sentences, the Supreme Court ruled Wednesday.

By a 5-4 vote, the court upheld Pennsylvania's death penalty system despite ''some mandatory aspects.''

The decision removed a threat to similar laws in 13 other states: Arizona, California, Connecticut, Idaho, Illinois, Maryland, Montana, New Jersey, Ohio, Oregon, Tennessee, Texas and Washington.

Most states have death penalty laws, but many of them do not resemble the Pennsylvania scheme.

Past Supreme Court rulings have struck down state laws making death the mandatory punishment for specific crimes, such as killing a police officer, or for specific offenders, such as prison inmates already serving life sentences when they commit murder.

Those decisions said the Eighth Amendment's ban on cruel and unusual punishment requires that sentencing judges or juries be allowed to consider aggravating and mitigating factors.

But Pennsylvania law says, ''The verdict must be a sentence of death if the jury unanimously finds at least one aggravating circumstance ... and no mitigating circumstance.''

Chief Justice William H. Rehnquist, writing for the court, said the law does not make death mandatory despite its mandatory-sounding language.

He was joined by Justices Byron R. White, Sandra Day O'Connor, Antonin Scalia and Anthony M. Kennedy.

''Death is not automatically imposed upon conviction for certain types of murder,'' Rehnquist said. ''It is imposed only after a determination that the aggravating circumstances outweigh the mitigating circumstances present in the particular crime committed by a particular defendant, or that there are no such mitigating circumstances.''

He added: ''The constitutionality of a death penalty statute having some mandatory aspects is not a novel issue for this court.''

But Justice William J. Brennan, writing for the dissenters, said the decision lets states bar juries from deciding that one particular aggravating circumstance is not enough to warrant a death penalty.

''Today, for the first time, the court upholds a statute containing a mandatory provision that gives the legislature rather than the jury the ultimate decision whether the death penalty is appropriate,'' Brennan said.

He was joined by Justices Thurgood Marshall, Harry A. Blackmun and John Paul Stevens.

The Pennsylvania law was challenged by Scott Wayne Blystone, one of more than 100 death row inmates awaiting execution in the state.

Blystone was convicted of the Sept. 13, 1983, murder of hitchhiker Dalton Smithburger Jr. in Fayette County, Pa.

Blystone drove to an isolated area, told Smithburger to get out, robbed him of $13 and fired six shots at point-blank range into his head.

The only aggravating circumstance found by the sentencing jury was that Blystone's murder accompanied a robbery. He did not submit any evidence to mitigate the crime.

The case is Blystone vs. Pennsylvania, 88-6222.