The Supreme Court ruled 8 to 0 yesterday that the National Society of Professional Engineers illegally restrained trade by making it unethical for a member to submit competitive bids for engineering services.

The court rejected the claim of the 69,000-member society that awarding engineering contracts to the lowest bidder would endanger the public health, safety and welfare.

The decision affects engineering fees that exceed $2 billion annually - about 5 per cent total construction costs.

Beyond that, the decision will make it more difficult for other professions to justify various restraints on competition on the commonplace ground that they ensure high ethical standards.

One justice, Harry A. Blackmun, expressed concern that, in one section of its opinion, the court intimated "that any ethical rule with an overall anti-competitive effect promulgated by a professional society is forbidden" by the Sherman Antitrust Act of 1890.

He said that some ethical rules may be somewhat anticompetitive and yet be "important to a profession's proper ordering." As an example, he cited a medical association's standards of minimum competence for licensing that may restrict the number of physicians.

Alan Morrison, head of the Public Litigation Group, which overturned a state bar associations' minimum fee schedules for lawyers in a Virginia case decided by the court in 1976, commented: "The escape hatch for anticompetitive activities by professionals of all kinds, which was thought to have been left open, now has been closed almost entirely."

The engineers' case did not involve a charge of price-fixing. Instead, it involved a charge that members of the society unlawfully agreed to refuse to negotiate or event to discuss the question of fees until after a prospective client selected the engineer for a project.

The society was organized in 1935 to promote the professional, social and economic interests of its members. In 1964 it adopted a code of ethics that sought to preserve the custom by which a client initially selects an engineer on the basis of background and reputation, not price.

The code did this by prohibiting members' submission of any form of price information that would enable a prospective customer to make a price comparison on engineering services.

The Justice Department charged that this violated the 1890 antitrust law. It cited an engineering firm that, following traditional methods, bid $500,000 to extend an airport runway in Huntington, W.Va. Believing the price too high, the Tri-State Airport Authority got three competitive bids and had the job done for $300,000.

A former chief of the Justice Department's antitrust division, Le Loevinger, defended the society. He argued that competition among the nation's 325,000 registered professional engineers would be contrary to the public interest and therefore, under the legal "rule of reason," not a forbidden restraint of trade.

A federal judge here ruled that the prohibition was unlawful on its face and was consequently "illegal without regard to claimed or possible benefits." The U.S. Court of Appeals for the District of Columbia affirmed and was upheld by the Supreme Court.

Justice John Paul Stevens wrote the opinion for the court. In one section, from which Blackmun and Justice William H. Rehnquist abstained, Stevens said that the society was making "nothing less than a frontal assault on the basic policy of the Sherman Act" in trying to impose its own views "of the costs and benefits of competition on the entire market place." He went on:

"The fact that engineers are often involved in large-scale projects significantly affecting the public safety does not alter our analysis. Exceptions to the Sherman Act for potentially dangerous goods and services would be tantamount to repeal of the statute."

The society had warned that without a total ban on competitive bidding, engineers will be tempted to submit deceptively low bids. But the equation of competition with deception "is simply too broad," Stevens wrote. "We may assume that competition is not entirely conducive to ethical behavior, but that is not a reason . . . for doing away with competition."

The lower courts had barred the society from stating or implying that competive bidding is unethical, and the society claimed that this violated its freedom of speech. Stevens found "no merit in this contention." Chief Justice Warren E. Burger did.

Justice William J. Brennan Jr. did not participate in the case.