In November he was a best seller. By December he was a defendant. His novel, "S, Portrait of a Spy" was pulled out of circulation, and author Ian Adams was facing a $2.2 million libel suit. Still, it could have been worse.

And it was: Two years later he became, by his own account, "the first novelist in the English-speaking world ever to have been ordered by a court to reveal the sources of information for a work of fiction."

Two years later yet, the 45-year-old Toronto journalist has beaten both raps and is here to promote the American edition, just published by Ticknor & Fields. Adams calls it "investigative fiction. Many people perceive me as a troublemaker, but we have to change our perceptions of what is fiction."

He had been interested in the "subterranean landscape" of espionage as a reporter in Vietnam, and finally decided to write a novel about Canada's intelligence services--which are part of the Royal Canadian Mounted Police--while covering the Chilean coup in 1973. He returned to find that "although there had been dozens of novels about the CIA, MI5 and Mossad, there was nothing written on the Security Services of my own country." Research for his free-lance articles, Adams says, turned up suspicions that "the RCMP was 'sick,' that is, penetrated by an enemy mole," and that its counterespionage unit "had never caught a real spy." By combining the two in a novel, he felt he could "demystify" the RCMP at a time when "Canadians were getting very smug following all the disclosures of CIA covert operations."

By 1977, Adams had turned the material into a tale in which the former head of RCMP counterespionage is abducted from retirement in Australia to face interrogation in Ottawa as a possible agent of both the CIA and KGB. After initial resistance--"publishers in Canada are very timid"--Adams got a $15,000 advance from Gage, and the book sold more than 17,000 copies in 30 days. Then he was sued, "the publisher lost his nerve and withdrew the book," and Adams found himself in major-league trouble.

Leslie James Bennett, a former head of RCMP counterespionage living in Australia, argued that S was based on his life. Bennett's testimony shocked the Canadian press: He revealed that his abrupt departure from the RCMP in 1972 had followed four days of secret interrogation in an Ottawa safe house "to clear up any doubts concerning my loyalty." The government still has not explained the reasons for the interrogation.

Adams kept insisting that S was a composite, and the suit dragged on for three years. Bennett was protected from answering many questions under the Official Secrets Act, but in 1980 the court ordered Adams to reveal his sources. He refused, risking both contempt charges and automatic loss of the libel suit. "This one-sided judgment enraged writers and journalists," Adams says, "and the whole thing became a cause ce'le bre." Financial aid began pouring in, but suddenly Bennett agreed to drop the suit in exchange for $30,000 to pay his legal fees and the peculiar statement that follows the standard disclaimer at the front of the book: "and in particular, 'S' is not and was not intended to be Leslie James Bennett."

Adams is still uncertain why Bennett withdrew. "Maybe he'd found out what he wanted to know--whether the RCMP would support him--or maybe the RCMP didn't want to be in the position of having to explain themselves publicly." Whatever the case, Adams, who had bought back the rights to his book for $10,000, was left with a hit paperback, what he calls "an enormous victory--we really beat back this attempt at a subtle form of censorship," and the freedom to pursue his next "investigative fiction" about CIA-sponsored mind-control experiments in Canada. It will be his sixth book and fourth novel: a sizable inventory for a man who never finished high school.

He was born in what is now Zaire, the son of British missionary parents whom he left at 16 because "I didn't buy their religious number." He made his way to Winnipeg, worked as a copy boy and reporter, then left on an eight-year odd-job odyssey around Europe, North Africa and South America. "Predisposed to be an outsider, an observer" and a veteran scorner of authority figures, he returned as an investigative reporter and was a staff writer for Maclean's magazine before turning to books in 1968.

Foreign intervention has been a recurring theme: In his first novel, a nuclear war between America and the U.S.S.R. is averted when both sides decide to abort their missiles over Canada; in a future story he will portray a Canadian ambassador turned Soviet agent. The sensitive subjects, coupled with Adams' roman a clef approach, can make it difficult to get published. "There's a different perception of power that comes from being a colonized state," he says, "and Canadian publishers have never had the courage to use the power they have." Especially when the subject is espionage. "The spy has replaced the cowboy as the most powerful fantasy figure in the public imagination. People these days feel they're so powerless. But the spy is given complete carte blanche. I want to explore those mythologies we have within ourselves."

"It's endlessly fascinating," Adams says. "I had one of those old-fashioned editors once who told me, 'There are some reporters who think there might be a snake under a rock. Well, I want a reporter who knows there's a snake under every rock!' I've always liked that idea of reality."