A former Iran-contra prosecutor and his publishing house complained in federal court yesterday that his old boss, independent counsel Lawrence E. Walsh, had threatened them with criminal prosecution to stop publication of a "behind-the-scenes" book about the investigation.

The book, "Opening Arguments: A Young Lawyer's First Case -- United States v. Oliver North," was written by Jeffrey Toobin, 30, who spent more than two years in Walsh's office as its youngest associate prosecutor.

Toobin and his publisher, Penguin Books USA Inc., filed suit in U.S. District Court in Manhattan yesterday, asking for an injunction to keep Walsh from taking any further action that would interfere with "their First Amendment rights" to publish the book.

Walsh had no direct comment, but a spokesman, Mary Belcher, said the book deals with "nonpublic aspects of the criminal investigations conducted by this office," including the identities of persons investigated but not indicted and criminal charges considered but not made.

"We believe that such disclosures not only would violate Mr. Toobin's legal obligations, but also would be unfair to the individuals involved and harmful to the continuing work of this office," she said.

As holder of a security clearance, Toobin, now a federal prosecutor in Brooklyn, was required to submit his book for prepublication review by the Central Intelligence Agency and, under a separate agreement, by Walsh's office. Penguin and its lawyer, Martin Garbus, said the CIA cleared the book last winter without requiring changes, but Walsh's office confronted them with "a year and a half of stonewalling, specious objections and intimidation."

The decision to sue came after Garbus wrote Walsh Tuesday saying "the time has come for the publication of the manuscript" because "based on the facts as we know them, there is absolutely no reason for any threat to interfere" with it.

Walsh's lawyer and longtime colleague, Guy Struve, called Garbus's office later that day and, according to the complaint, warned that publication would make Penguin an "agent in the publication of illegal materials."

"We asked them, 'Do you intend to stop the book?' and they didn't answer," Garbus added last evening. "We take the position that we have an obligation to defend {Toobin} as an author."

According to the lawsuit, Toobin has made a number of changes requested by Walsh and his office since mid-1989, including "specific passages which contained classified material," but the two sides remained at loggerheads over the rule prohibiting disclosure of matters presented to Iran-contra grand juries.

The lawsuit said Struve more than a year ago promised a list of passages involving that rule but failed to produce it and left Toobin with only a suggestion "to adopt a do-it-yourself approach" to such material.

It is the grand jury secrecy dispute that has evidently prompted the warnings of criminal action. Garbus and David Boies, Toobin's lawyer, said in the complaint that the Justice Department had stepped into the fray at the request of Walsh's office last April and listed some grand jury material. But they said Toobin demonstrated he had independent sources for each passage, and the Justice Department last month decided not to take action.

The department warned Toobin, however, that Walsh was still free to prosecute on those grounds and that if he did, the department would bring civil action to impound Toobin's revenues from the book.

Subsequently, the complaint said, Struve asked Toobin's superiors at the U.S. Attorney's office in Brooklyn to take action against him. FBI agents, the suit said, also began interrogating friends and former colleagues of Toobin "as part of a purported criminal investigation."

According to the complaint, Walsh told Toobin before Toobin left the office in May 1989 that he, too, was "considering writing a book" about his work. Walsh told a reporter last night that he was only speaking hypothetically, in an effort to persuade Toobin to "to wait until the work of the office was done."

The North case is still on appeal, Walsh has yet to issue his final report, and his grand jury investigations are not yet completed. He is expected to finish next spring.

Garbus said publication was "imminent" but declined to give a date. At immediate issue, he said, is Penguin's desire to distribute 300 galley copies to reviewers nationwide. He said, "This is the first time I know of that a publishing house has been threatened with criminal action for publishing a book."