A unanimous Supreme Court ruled yesterday that states, consumers and competitors can obtain court orders to undo corporate mergers found to violate federal antitrust law.

The decision is likely to instill caution among the already-wary players in the takeover market. The California state attorney general immediately vowed to use the ruling in "putting the brakes on merger mania."

In antitrust suits brought by the federal government, it has long been clear that judges can direct companies to keep their merged operations separate until the courts determine whether the combination violates antitrust law by impeding competition. The judges can then order the company to divest itself of the newly acquired asset.

Yesterday's decision gives judges the same broad power to order divestiture in suits brought by states, consumers or others who contend that they will be injured by a merger. Had the ruling gone the other way, a court would have been largely limited to ordering that triple damages be paid to those injured by the merger.

The issue is particularly significant because the federal government, beginning with the Reagan administration, has looked more kindly on mergers than many state attorneys general.

In another decision expanding states' power in the antitrust field last year, the court said that states can allow indirect purchasers such as retail customers to sue price fixers under state antitrust laws even though federal law would bar them from making such claims.

In a friend-of-the-court brief in the case decided yesterday, 32 states had complained that a lower court ruling limiting their power to seek nullification of a merger had "substantially impaired" their ability to enforce the antitrust laws.

On the other side, the Business Roundtable said companies could be deterred from pursuing beneficial mergers if they continue to "face a high level of uncertainty" because of private suits brought even after their plans have been cleared by federal officials.

"Encouraging states to be active in the antitrust field is the wrong way to go," Thomas B. Leary, an official of the Business Roundtable, said yesterday. "It is particularly ironic that when Europe is moving toward uniform rules for a common market, we're moving in the opposite direction."

The ruling came in a lawsuit brought by the California attorney general challenging the $2.5 billion merger of American Stores Co., the state's fourth-largest grocery chain, with Lucky Stores Inc., the largest in the state.

American, which operates the Alpha Beta supermarkets, launched a hostile tender offer for Lucky in March 1988 and bought the company in June. In August, the Federal Trade Commission permitted the merger to go forward after American agreed to sell 37 of its supermarkets.

The next day, California Attorney General John van de Kamp filed suit against the company, contending that the merger would eliminate competition and cost state consumers $440 million annually in higher grocery prices. The company estimated that its customers would save $50 million a year because of more efficient operations.

A federal judge, finding that "the citizens of California will be substantially and irreparably harmed" by the merger, ordered the combined companies to keep their operations separate while the case proceeded.

The federal appeals court in San Francisco agreed that the merger probably violated antitrust law. But the court said the judge did not have power, in an antitrust suit brought by a private party, to stop the companies from combining operations. As the representative of consumers, the state is treated as a private party in such suits.

In reversing the appeals court ruling yesterday in California v. American Stores Co., Justice John Paul Stevens said the Clayton Act, which allows private parties to obtain "injunctive relief ... against threatened loss or damage by a violation of the antitrust laws," is "plainly sufficient" to allow divestiture orders.

He said that interpretation "fits well in a statutory scheme that favors private enforcement, subjects mergers to searching scrutiny and regards divestiture as the remedy best suited to redress the ills of an anticompetitive merger."

In a concurring opinion, Justice Anthony M. Kennedy said he agreed with the decision but noted that California's delay in challenging the merger -- waiting until after the FTC had completed its review and approved the plan -- could prevent the state from obtaining a divestiture because it waited too long to file suit.

Andrea Sheridan Ordin, chief assistant attorney general for California, said the Supreme Court ruling would enable states and private individuals to "fill in some of the gaps" in antitrust enforcement.

The high court ruling "gives state attorneys general a hammer they didn't have before," said Christopher O.B. Wright, a Los Angeles antitrust attorney with the firm Latham & Watkins. Wright said the case would be "a big boost to state antitrust enforcement and a prod to federal enforcement." Before yesterday, merging companies had no incentive to negotiate with state officials because states had no remedy after the completion of combinations. Now, Wright said, state attorneys general are "a force to be reckoned with."

American Stores will now have to return to lower courts and go to trial on the merits of the merger. Michael T. Miller, senior vice president for American Stores, said that keeping the chains separate had hurt morale and made it impossible to achieve millions of dollars a year in savings.

Staff writer Steven Mufson contributed to this report.