The Supreme Court ruled 5 to 4 yesterday that lawyers can publish advertisements about the availability and prices of "routine" legal services, such as uncontested divorces, adoptions and personal bankruptcies.

The decision probably will work profound changes in the way many of the nation's 400,000 lawyers practice their profession and has important implications for other professions as well.

The court held that the constitutional guarantee of free speech does not permit suppression of all attorney advertising. The justices emphaaized that they were not premitting advertisements that cited the quality of legal services.

The decision specifically upheld advertising of the availability and terms of legal services in newspapers. But a dissenter, Justice Lewis F. Powell Jr., wrote that "no distinction can be drawn between newspapers and a rather broad spectrum of other means, for example, magazines, signs in buses and subways, posters, handbills and mail circulations."

The court did not decide whether the First Amendment allows lawyers to advertise on radio and television the same facts they now can advertise in print. "As with other varieties of speech . . . there may be reasonable restrictions on the time, place, and manner of advertising," Justices Harry A. Blackmun wrote in the opinion for the court. "And the special problems of advertising on the electronic broadcast media will warrant special consiredation."

The decision reversed the Supreme Court of Arizona, which had censured two young lawyers, John R. Bates and Van O'Steen, for publishing an ad in the Feb. 22, 1976, Arizona Republic, a daily newspaper in Phoenix. The ad, headlined Do You Need a Lawyer/," offered "Legal Services at Very Reasonable Fees," including $195 for "divorce or legal separation - uncontested (both spouses sign papers)." The ad was signed by the "Legal Clinic of Bates & O'Steen."

The censure was rooted in a ban on lawyer ads originated by the American Bar Association and incorporated by the Arizona Supreme Court in its Code of Professional Responsibility.

The Justice Department had argued that the ad ban violated the Firt Amendment. The ABA, numerous states and organizations and an individual lawyer filed 15 additional friend-of-the-court briefs, nearly all of them opposed to lawyer advertising.

The Arizona judges ruled - and the department agreed - that the ban did not violate the antitrust laws, because it was an official action of a state. The U.S. Supreme Court upheld this position 9 to 0.

ABA President Justin A. Stanley said yesterday that the association has set up a task force "to develop rapidly a set of recommendations on what the bar must do to respond affirmatively to the court's decision.

"I am confident that under this decision we will be able to find ways to provide more information about legal services while still protecting the public from misleading advertising," Stanley said.

Officials of Washington-area bar associations, all of which have attempted over the past year to liberalize their own prohibitions against advertising, yesterday expressed mixed reaction to the court's ruling.

While the officials said they favored greater public access to a market of legal services, some said they were concerned that competition for advertising might adversely affect the legal profession and in some cases mislead the public.

The officials said it was too soon to predict how the court's decision would affect prices for routine legal services. The publication of fee schedules might encourage some people, who thought they could not afford to pay a lawyer, to obtain legal advice, some lawyers said.

For the high court, a core issue was whether the First Amendment protection of limited commercial speech extended from prescription drugs to legal services.

In a ruling a year ago, the court stuck down a Virginia law making a professional pharmacist guilty of "unprofessional conduct" if he advertised the prices of prescription drugs.

The court held that the state could not protect its admitted strong interest in maintaining professionalism among pharmacists by keeping its citizens in ignorance.

To this "highly paternalistic" way of protecting people, the court said, there is a "potent alternative": assume that price and availability information is not harmful, and, in the expectation that "people will preceive their own best interests if only they are well enough informed . . .open the channels of communication . . ."

The legal profession's disciplinary rules against advertising also serve "to inhibit the free flow of commerical information and to keep the public in ignorance," Blackmun wrote for the majority.

Powell, joined by Justice Potter Stewart in the principal dissent, argued that for First Amendment purposes, prepackaged prescription drugs are essentially different from "routine" legal services, partly because of a "vastly increased potential for deception . . ."

Questioning "facile assumptions" that legal services can be classified in advance "into the routine and unique," he said that a potential client for Bates and O'Steen's $195 divorce "can be greivously misled if he reads the advertised price as embracing all of his possible needs."

Blackum considered and rejected such arguments. "The only services that lend themselves to advertising are the routine ones," he said.

Chief Justice Warren E. Burger warned in a separate dissent that the decision "will create problems of unmanageable proportions" by imposing "enormous new regulatory burdens . . . on the presently deficient machinery of the bar and courts . . ."

Blackmun had an acid reply: "It is at least somewhat incongruous for the opponents of advertising to extol the virtues and altruism of the legal profession at one point, and, at another, to assert that its members will seize the opportunity to mislead and disstort."

Blackmun said lawyer advertising may well benefit the administration of justice, reduce costs to consumers, and aid new lawyers entering the market.

Justice William H. Rehnquist, in the fourth dissent, said that the First Amendment, "a sanctuary for expressions of public importance or intellectual interest, is demeaned by invocation to protect advertisements of goods or services."

Louis Oberdorfer, the president of the District of Columbia Bar, said he thought the majority of the court was "particularly interested in lawyers who at least claim to be able to provide services the way H & R Block provide income tax services."

Oberdorfer said the decision to permit some advertising would also help inform the public of various-legal clinics that provide low-cost assistance of routine matters.

Last November, the D.C. Bar sent to the D.C. Court of Appeals for approval a far-reaching plan to allow lawyers in the District to advertise their fees and services in television and radio commercials, in newspapers and on billboards. The Court of Appeals has not yet acted on the proposal.

Oberdorfer predicted that eventually there will be some advertising by lawyers in yellow pages of the telephone book, in the classified sections of daily newspapers and in other periodicals.

An official of the Virginia State Bar said yesterday he expected that initially, lawyers would be "very cautious" about advertising their services.

"It's the worst way to look for a lawyer," said William T. Prince, of advertising of legal services.

"I think there ought to be a way the public can learn what the average fees are, I just question whether news advertisements are the way to do it," said Prince, who is president-elect of the Virginia bar.

In April, 1976, the Virginia Supreme Court rejected a proposal, made by the state bar, that lawyers be allowed to advertise their services and fees in telephone and legal directories and include information on credit terms, legal specialties and membership in legal organizations. The proposal was based on ABA standards approved the previous February.

In Maryland, the State Bar Association over a year ago proposed that the Maryland Court of Appeals approve a plan to establish directories in which lawyers could list information on their professional background, credit terms acceptable, and various fee information. The Court of Appeals has not acted on the request, according to Bar Association president Norwood Orrick.

Orrick said he preferred a system of "readily available, uniform information sources," such as the directories, instead of competition among lawyers for advertising space in a newspaper or other preiodicals.