The Supreme Court ruled 6 to 3 yesterday that police officers who annually stop millions of motorists for traffic violations can order them out of their vehicles.

The court said that "legitimate concerns" for the officers' safety outweigh "what is at most a mere inconvenience"for the motorists.

The ruling provoked harsh dissents from Justices John Paul Stevens, William J. Brennan Jr. and Thurgood Marshall, and from Marshall separately.

Stevens wrote that the majority, by eliminating "any requirements that an officer be able to explain the reasons for his actions," authorizes "the indiscriminate invasion of the liberty of every citizen stopped for a traffic violation, no matter how petty," and "leaves police discretion utterly without limits."

"Some citizens will be subjected to this minor indignity, while others - perhaps those with expensive cars, or different bumper stickers, or different colored skins - may escape it entirely."

The ruling came five weeks after the court denied recourse in federal tribunals to highway travellers illegally stopped and searched for drugs solely because they had long hair.

The new case involved Philadelphia police officers who in 1970 stopped a car with expired license tags and ordered the driver to get out. He had a bulge under his sports jacket. A "frisk" showed a loaded .38 cal. revolver caused it.

The issue was whether the search violated the Constitution because it followed an impermissible "seizure" - the order to get out of the car. The Pennsylvania Supreme Court ruled in February.Meanwhile, the motorist, Harry Mimms, a Black Muslim, has completed a three-year prison sentence, the maximum for carrying a concealed deadly weapon.

Yesterday, the majority reversed the lower court summarily - without first requiring the parties to submit extensive written briefs or hearing oral argument. The justices did not sign the opinion.

Stevens condemened this "summary disposition of a novel constitutional question" by a majority that announced it "almost casually." Handling of this kind creates "the unfortunate impression that the court is more interested in upholding the power of the state than in vindicating individual rights," he said.

Similarly, Marshall wrote that the disposition "cannot engender respect for the work of this court."

Yesterday's decision drew on a 1968 case - decided by the court after elaborate briefing full oral argument and six months of deliberation - upholding a detention and frisk bu an officer who believes "that the persons with whom he is dealing may be armed bnd presently dangerous" and has fear for his own or others' safety."

The officer in point, who had been patrolling downtown Cleveland for 30 years, saw two men look repeatedly in a store window, confer in a manner that made him think they were "casing" the store for a possible stickup, and then join a third man with whom they had conferred earlier. he asked for their names, got "mumbled" responses, frisked one of them and found a pistol.

Yesterday's majority - Chief Justice Warren E. Burger and Justices Potter Stewart, Byron R. White, Harry A. Blackmum, Lewis F. Powell Jr. and William H. Rehnquis - found support in this sentence from the 1968 opinion: "Certainly it would be unreasonable to require that police officers take unnecessary risks in the performance of their duties."

In the Mimms case, the majority noted that the officer "had no reason to suspect foul play." All he had to go on was an expired license plate, Marshall wrote. "There is simply no relation at all between that circumstance and the order to step out of the car."

The majority also cited an article saying, "According to one study, approximately 30 per cent of police shootings occurred when a police officer approached a suspect seated in an automobile."

The study involved 110 selected police shootings, including 35 in which officers were trying to investigate, control or pursue suspects in cars. Some of the 35 officers were shot while still in their patrol cars, some while getting out of them and some by passengers.

Stevens wrote that the statement cited by the majority "does not fairly characterize the study," which lends "no support to the court's assumption that ordering the routine traffic offender out of his car significantly enhances the officer's safety."