NEW YORK, SEPT. 12 -- A state judge today issued a middle-of-the-night order temporarily barring St. Martin's Press from distributing a book about the Mossad, Israel's secret intelligence service.

The Israeli government sought the ban of the book, "By Way of Deception: The Making and Unmaking of a Mossad Officer." The author, Victor Ostrovsky, claims to have been a Mossad operative in the mid-1980s.

Lawyers for the Israeli government argued that the book contained information that could, in the language of the judge's order, "endanger the lives of various people in the employ of the state of Israel, and would be detrimental to the government of the state of Israel."

State Supreme Court Justice Michael J. Dontzin signed the order in his apartment at 1:05 a.m. after hearing from lawyers for Israel and St. Martin's. The Supreme Court in New York is a trial-level court, not a court of appeal.

Dontzin said he would hear arguments Friday on whether to keep the ban in effect.

The judge ordered St. Martin's to tell bookstores that none of the 17,000 copies shipped so far is to be sold.

Newspapers have reported that Ostrovsky's book says Mossad officials knew in advance about the terrorist bombing that killed 240 U.S. Marines in Beirut in 1983 but said nothing because it wanted relations between the United States and Arab nations to worsen.

The book also reportedly describes Mossad spying inside the United States.

Roy Gainsburg, president of St. Martin's, denounced the order and denied that anyone would be endangered by the book.

"Wherever the disclosure of a person's name might endanger them, that name is not mentioned," Gainsburg maintained. "We are confident this book doesn't endanger anybody.

"It'll certainly embarrass a lot of people. But can you imagine a book being banned in the United States because it's detrimental to some other government? Or to the United States government, for that matter? The First Amendment says you can be as critical as you want about the U.S. government or any government."

A St. Martin's lawyer, John Lankenau, commented: "There are 17,000 books out there already. Is any foreign intelligence agency so inept that it can't get a copy?"

Lankenau said he was filing an appeal of Dontzin's order.

On Friday, Israel obtained a court order in Ontario barring release of the book in Canada, where Ostrovsky, 40, now lives. The book's primary publisher, Stoddart Publishing Co., is Canadian.

Gainsburg said that nothing about the matter was heard in New York until Tuesday, when lawyers representing Israel telephoned to ask that copies not be shipped to U.S. sellers.

The publisher said that when they learned several thousand books already were out, the lawyers said they wanted to see a judge.