The Supreme Court yesterday handed a victory to an unusual alliance of corporate giants, white-collar-crime defense lawyers and the American Civil Liberties Union by making it impossible for government lawyers in different divisions of the Justice Department to share the fruits of secret grand jury investigations routinely.

The 5-to-4 decision said anyone other than the prosecutors conducting the criminal grand jury probe must obtain a court order to gain access to the information produced by the grand jury. Justice Department lawyers are not "free to rummage through the records of any grand jury in the country, simply by right of office," Justice William J. Brennan Jr. wrote for the court.

The decision, designed to protect grand jury secrecy, may frustrate what has been a routine referral practice within the department when prosecutors discover a potential civil fraud violation or antitrust charge while conducting a criminal probe.

For example, the decision means that Antitrust Division lawyers must go to court, where they can be tied up at length, and demonstrate a special need for the materials and the likelihood of their use in some pending or anticipated litigation.

The ruling stems from complaints that civil attorneys in the government are using the vast investigative subpoena powers of federal grand juries to obtain information unavailable with their own more limited authority and that grand juries are sometimes convened with the real intent of transferring information to other Justice Department divisions.

Judges considering the requests have the flexibility to show some deference to the government, Brennan said, but generally they are to treat these government lawyers as if they were no different than private parties seeking the secret materials. They are not to "rubber stamp" the requests, he said.

In a related case yesterday, the court said the Internal Revenue Service is not entitled to grand jury materials to help it conduct tax audits.

The first case, U.S. vs. Sells Engineering, originated with a federal grand jury probe of criminal fraud allegations against officials of Sells Engineering Inc., in connection with a U.S. Navy contract to produce airborne radar interference devices. Eventually, three officials pleaded guilty to criminal fraud charges as part of a plea bargain.

Later, the government sought to have grand jury materials turned over to officials in the Justice Department's Civil Division, including paralegals and secretarial assistants, for use in a possible civil suit under the False Claims Act.

In this instance, the government sought a court order for release of the materials, though it said it did not really need one. The 9th U.S. Circuit Court of Appeals reversed the order, saying the government had not shown sufficient need for the materials. Yesterday, Brennan said the government must go to court in such situations and must make a strong showing of "particularized need."

At issue were provisions of the Federal Rules of Criminal Procedure that require grand jury secrecy with several exceptions. One exception is for "an attorney for the government for use in the performance of such attorney's duty." The other allows release of the material "when so directed by a court preliminary to or in connection with a judicial proceeding."

Brennan said the exception for government attorneys, permitting automatic access, applies only to prosecutors working with the grand jury. It was "never intended to grant free access to grand jury materials to attorneys not working on the criminal matters to which the materials pertain," he said.

That clearly excluded lawyers outside the department's Criminal Division, such as Civil Division and Antitrust Division officials. They must get a court order, Brennan said.

They can get one, he said, only with a "strong showing" that it is needed to avoid a possible injustice in another proceeding and that their need clearly outweighs the "public interest in secrecy." The order may also be strictly limited to directly relevant materials.

Brennan said that the restrictions would make witnesses more likely to testify before grand juries, prevent grand jury manipulation by prosecutors and prevent civil officials from exceeding their information-gathering authority.

"If a witness knows or fears that his testimony before the grand jury will be routinely available for use in governmental civil litigation or administrative action," he said, "he may well be less willing to speak for fear that he will get himself into trouble in some other forum.

" . . . If prosecutors . . . knew that their colleagues would be free to use the materials generated by the grand jury for a civil case," Brennan said, "they might be tempted to manipulate the grand jury's powerful investigative tools to root out additional evidence useful in the civil suit, or even to start or continue a grand jury inquiry where no criminal prosecution seemed likely."

Chief Justice Warren E. Burger, joined by Justices Lewis F. Powell Jr., William H. Rehnquist and Sandra Day O'Connor, dissented.

The General Motors Corp. and the Miller Brewing Co., which are involved in similar cases, had urged the court to take yesterday's action. So had the American Bar Association and the ACLU.

Brennan also wrote the 8-to-1 decision yesterday in U.S. vs. Baggot, holding that an IRS civil tax audit was not sufficiently related to any judicial proceeding to justify release of grand jury information to the IRS. Burger dissented.

In an important labor relations case yesterday, the court said that workers hired to replace strikers during a Kentucky labor dispute may go into state court to sue the employer for firing them after the union workers were reinstated as a result of a settlement.

The National Labor Relations Board had contended that federal labor law barred resort to state courts in such situations. The decision in Belknap Inc. vs. Hale et al. was written by Justice Byron R. White. Justice Harry A. Blackmun wrote a separate concurrence while Brennan, joined by Justices Thurgood Marshall and Powell, dissented.