NEW YORK, JAN. 3 -- A federal judge today questioned whether the main prosecutor in the Iran-contra scandal is trying to scare a young prosecutor out of writing a book about the investigation of former White House aide Oliver L. North.

U.S. District Judge John Keenan raised the issue during a hearing on Penguin USA's motion for an injunction to stop independent counsel Lawrence E. Walsh from censoring a book about the probe.

The book "Opening Arguments: A Young Lawyer's First Case -- United States v. Oliver North" was written by Jeffrey Toobin, now a federal prosecutor in Brooklyn. Toobin served with the independent counsel for more than two years.

Under a confidentiality agreement, Toobin had to submit the book for pre-publication review by Walsh's office, but Walsh would not approve publication, and Penguin and Toobin sought an injunction barring Walsh from efforts to censor the book.

Lawyers said today that Walsh's office indicated it might send a letter to the legal body that disciplines lawyers in New York -- a move that could get Toobin fired.

"If you were a young lawyer, wouldn't you feel a little restrained, a little chilled?" Keenan asked Guy Miller Struve, who is representing Walsh's office. "How can you tell me you're not trying to scare this young fellow out of writing his book?"

Struve said these were measures that had been considered but not taken, adding, "We do not consider this a threat."

Toobin, who worked on the Iran-contra case between January 1987 and May 1989, testified that he had not decided to write the book until the spring of 1989 and had told Walsh of his decision.

"He was not at all upset," Toobin testified. "He said he was planning on writing a book himself."