It is one of the thorniest moral dilemmas a criminal defense lawyer can confront: what to do when a client plans to lie on the witness stand.

On the one hand, lawyers are supposed be zealous guardians of their clients' confidences, obliged not to violate the sanctity of the attorney-client privilege.

On the other, they face a conflicting duty, as officers of the court, not to let themselves become parties to perjury.

Last week, the Supreme Court waded into the issue, hearing oral arguments in the case of an Iowa man who claimed his constitutional rights were violated when his lawyer threatened to inform the trial judge if he committed perjury.

The court's decision in the case, Nix v. Whiteside, "is likely to affect the ethical standards governing the conduct of lawyers throughout the United States," the American Bar Association said in a friend-of-the-court brief.

What could turn into a landmark ruling on legal ethics started as a drug-related murder eight years ago in Cedar Rapids, Iowa.

On Feb. 8, 1977, Emmanuel Charles Whiteside and two friends went to the apartment of Calvin Love to get some marijuana. An argument broke out, and Whiteside fatally stabbed Love. Whiteside claimed he acted in self-defense after seeing Love reach under the pillow for a gun.

Cedar Rapids lawyer Gary L. Robinson, three years out of law school, was appointed to represent Whiteside.

According to Robinson, Whiteside consistently said he did not actually see the gun but was certain Love had been reaching for one because of his reputation for carrying a weapon.

Less than a week before trial, Whiteside's story changed. While Robinson and another lawyer were reviewing questions with their client at a practice session, Whiteside shocked them by stating that he had seen "something metallic" just before stabbing Love.

Asked why he had never mentioned that before, Whiteside explained, "If I don't say I saw a gun, I'm dead," Robinson recalled.

Robinson said at a later court hearing that he responded to the startling development by explaining to Whiteside that it was not necessary for him actually to have seen a weapon to claim self-defense, and that testifying falsely that he saw a gun would be perjury.

He warned his client that he could not stand by if Whiteside committed perjury. If Whiteside insisted on testifying he saw a gun, Robinson warned, he would try to withdraw from the case, and "it would be my duty to advise the court what he was doing."

Whiteside backed off the scheme. At the trial, he testified only that he "most definitely thought" Love had a gun. He was convicted of second-degree murder and sentenced to 40 years in prison.

On appeal to the Iowa Supreme Court, Whiteside contended that Robinson had not effectively represented him. The court upheld the conviction, ruling that Robinson had "properly refused to be a partner in such a dishonest and deceitful scheme" and commending him for acting in a "high ethical manner."

Whiteside took his case to federal court on similar grounds, arguing that Robinson's actions violated Whiteside's Sixth Amendment right to effective assistance of counsel.

A three-judge panel of the 8th U.S. Circuit Court of Appeals agreed and said Whiteside was entitled to a new trial. While "criminal defendants' privilege to testify in their own defense does not include the right to commit perjury," the court said, Robinson "went so far in his . . . zeal to avoid deceiving the court that he became an adversary to his own client. In this situation, [Whiteside] did not receive the effective assistance of counsel."

In friend-of-the-court briefs, 37 states, including Maryland and Virginia, and the American Bar Association have urged the Supreme Court to overrule the decision. "The public cannot be expected to place confidence in a judicial system which grants a new trial on the grounds that an attorney . . . persuaded his client to testify truthfully," the brief said.

In oral arguments last Tuesday, the justices appeared inclined to agree.

"I don't know of anything worse for a lawyer to do than to produce perjured testimony," said Justice Thurgood Marshall.

"The lawyer was urging him not to commit a crime that he proposed to commit," said Chief Justice Warren E. Burger. "Is that any different from him saying, 'I think I'll go out and shoot that witness, the only eyewitness,' and the lawyer talks him out of it?"

Iowa Deputy Attorney General Brent R. Appel, asking the court to overturn the appeals court's "tremendous extension of the right to counsel," said he saw no difference between the two scenarios.

But Whiteside's lawyer, Patrick R. Grady of Cedar Rapids, argued that permitting lawyers to blow the whistle on their clients' perjury would undermine the lawyer-client relationship that is crucial to an effective defense.

Lawyers should try to dissuade clients from lying, pointing out the threat of a stiffer sentence or perjury prosecution, he said. But, Grady said, Robinson "jumped straight to the threat to disclose without going through these other steps."

Lawyers agree that the situation in which Robinson found himself is rare: Clients generally do not admit they are planning to lie.

"I don't think normally people come in to you and say, 'I'm going to tell this big bad lie,' " said Plato Cacheris, a noted white-collar criminal defense lawyer here.

When a client's story seems questionable, he said, "If you're in command of the facts, you can gently suggest to him that the position is not going to be acceptable." But if the client insists, "You don't go to a judge and say, 'Hey, my client's lying.' We're not gods in this business, and maybe the client's position is right."

Charles H. Ogletree, former deputy director of the Public Defender Service here and now a visiting professor at Harvard Law School, agreed that a questionable story alone does not raise a moral problem: "We are not the triers of fact. The fact that your client's story sounds bizarre or incredible is not a reason to conclude that it's untrue."

The debate concerns what the lawyer is supposed to do in the rare event that the client cannot be talked out of what is clearly a perjury scheme.

Under the American Bar Association Model Rules of Professional Conduct, adopted in 1983, the lawyer should first try to withdraw from the case. If the judge will not permit that, and the attorney believes the client has just committed perjury or is about to do so, the lawyer should inform the judge.

The National Association of Criminal Defense Lawyers has endorsed a position at the far end of the scale: a lawyer in that situation may try to withdraw from the case only if that action does not harm his client's interests; if he cannot withdraw, he must let the court hear the false story -- and ask questions to draw out the story, cite it in closing arguments and otherwise act so as not to signal he believes the story is untrue.

"If you leave it out . . . you might just as well say, 'I don't believe that story for a minute,' " said Hofstra Law School Professor Monroe H. Freedman. The only thing the lawyer is not bound to do, he said, is to help the client "polish the perjury."

Freedman warned that "if the Supreme Court puts its seal of approval on what the lawyer did in this case . . . what it means is that every lawyer in the first interview is going to have to give his or her client a Miranda warning" -- referring to the Supreme Court ruling that police must tell suspects, among other things, that what they say may be used against them in court.

That would completely undermine the lawyer-client relationship, Freedman warned. "Most criminal defendants are poor, they're uneducated, they're frightened, they're confused, they have court-appointed lawyers . . . sent by the same court that is trying them, and if the lawyer walks in and says, 'Tell me everything, but, if I find or if I decide that you are committing perjury, I will have to tell the court,' the client is not going to be candid with the lawyer," he said.

Robinson, the lawyer whose actions are at the heart of Nix v. Whiteside, says he remains convinced that he acted properly.

"A client is always going to shade the truth one way or the other, you can expect that, but as long as the client maintains to you that he is telling the truth, your position as an advocate is that is the position you go with," he said in an interview the day after the Supreme Court heard oral arguments in the case.

"In this case it was different. He said, in effect, he was going to lie, and we said, in effect, no, he wasn't . . . . I'd be very surprised if somebody in Iowa would have done anything differently."