Independent Counsel Lawrence E. Walsh contended yesterday that a former staff prosecutor and his publisher should be subject to legal sanctions if they publish an insider's account of the Iran-contra investigation.

In a brief filed in federal court in New York, Walsh said he was not seeking "any prior restraint of publication." But he maintained that he is entitled to a ruling that the manuscript by former prosecutor Jeffrey Toobin contains materials protected against disclosure by the grand jury secrecy rule and by Toobin's obligations as a member of the New York bar and as a former federal employee.

Toobin and his publisher, Penguin Books USA Inc., "have at all times been free to publish" the manuscript, but they should be "subject to the legal consequences of that action," the brief filed by Walsh lawyer Guy M. Struve said.

Penguin lawyer Martin Garbus denounced the filing as "an outrage." He said Walsh's objections to the manuscript, which are under seal, still amount to "just general allegations."

The court battle was initiated late last month by Toobin and Penguin in a complaint charging that Walsh's office had threatened them with criminal prosecution over the contents of the book, "Opening Arguments: A Young Lawyer's First Case -- United States v. Oliver North."

The 30-year-old author and the publishing house asked for an injunction prohibiting Walsh from any further interference with "their First Amendment rights" and for a declaratory decree stating that the manuscript does not violate either the grand jury secrecy rule or Toobin's contractual and fiduciary obligations.

Walsh said it was he, not Toobin, who was entitled to a declaratory judgment and that it should say exactly the opposite of what Toobin wants.

As Walsh's lawyer, Struve asserted a broad coverage for the grand jury secrecy rule, extending it to interviews of witnesses who later testified before the grand jury and to "prosecutorial deliberations before or after presentations to the grand jury."

The brief also charged that Toobin's manuscript violates legal canons protecting secret and confidential client information "with a vengeance," especially with the North case pending before the Supreme Court.

In this case, "the client is an agency for which the government attorney worked," the brief said. It said Toobin's manuscript "constitutes a flagrant violation" of disciplinary rules applicable to him as a lawyer.

Walsh took the position in a footnote that his still-to-be-written final report could contain information out of bounds for Toobin since the report can be made public only with the approval of the three-judge court in charge of independent counsels.

Affidavits supporting Walsh's position, at least in connection with disclosures made before an investigation was complete, were submitted by Arthur L. Liman, former chief counsel to the Senate Iran-Contra Committee; former special prosecutor Leon Silverman; former U. S. attorney and special Justice Department counsel Paul Curran, and former deputy attorney general Harold R. Tyler Jr.

"It is impossible for me to imagine any prosecutor's office that would not suffer materially if employees of that office felt free during the course of on-going investigations to disclose any aspect of those investigations," Silverman said.