In the multiple Iran-contra cover-ups being dissected on Capitol Hill, all the president's lawyers played critical roles -- and responded to the growing scandal in radically differing ways.

Most acted, it appears from testimony to the Iran-contra committees, to serve the interests of their agencies and protect their superiors. But one, possessing hard evidence of the promulgation of a cover story about Iran arms shipments, went beyond his immediate agency to sound the alarm at the highest levels of the Reagan administration.

That was Abraham D. Sofaer, the former federal prosecutor, law professor and U.S. judge who for the last two years has been State Department legal adviser.

According to his testimony -- given to the committees in a deposition released yesterday -- Sofaer was the internal whistle-blower of the Iran-contra affair. He took that role, apparently, because he knew that Secretary of State George P. Shultz had been told details about a November 1985 shipment of arms to Iran that were flatly contradicted by the "concocted" administration story that the shipment contained only "oil-drilling equipment," not Hawk missiles. Sofaer, unlike others involved, also had reason to believe that his department was free of attempted cover-ups.

Testimony about administration lawyers who have marched across the Iran-contra stage in recent weeks has focused on their part in advising their immediate clients, the heads of their departments. But Sofaer said he felt he had a higher-ranking client than Shultz -- the president.

"Let me ask you," an Iran-contra committee lawyer asked Sofaer in his deposition last week, "do counsel to different departments, such as the National Security Council or the legal adviser himself -- your position -- do they have each as their ultimate client the president of the United States?"

"Absolutely," Sofaer replied.

"So that in addition to being the legal adviser to the secretary of state, you're also one of the president's lawyers?"

"Yes."

Sofaer tried to act as a lawyer to the president last Nov. 18, at a meeting that brought together lawyers from the Central Intelligence Agency, NSC, State Department and the White House. The agency lawyers, including Sofaer, pressed NSC counsel Paul Thompson for information about testimony being prepared for CIA Director William J. Casey and national security adviser John M. Poindexter, who were both scheduled to appear on Capitol Hill to explain the unraveling Iran arms-sale story.

Thompson refused, saying in Sofaer's words that Adm. Poindexter "had instructed him {Thompson} not to give out any information to people who didn't need to know it."

This led committee counsel to ask Sofaer: "And you're telling us that at this meeting counsel to the president was asking another counsel to the president for facts so that he could give the president advice and Thompson said, no, on orders from Adm. Poindexter? . . . Didn't you find that unusual?"

"Absolutely."

"And disturbing?"

"Very disturbing."

After weeks of listening to witnesses offer circumlocutions and high-sounding terms -- "strategic initiatives" or simply "the initiative" and "the enterprise" -- cloaking what had happened, Sofaer's words were refreshingly blunt and direct.

He called a cover-up a cover-up. He worried about lies, misleading Congress with false testimony, about people around the president "who were not telling him the truth," about attempting to ensure that administration officials acted "to avoid letting the president be drawn into a cover-up scheme of any kind through his sense of loyalty, which he has in abundance."

And he took action to alert higher-ups last November and December of his concern that the president faced an "extremely serious" situation and that possibly laws have been broken.

He attempted to call Attorney General Edwin Meese III directly. Failing to get him, he told Deputy Attorney General Arnold Burns of his concerns.

Later, Burns called back to say he had relayed Sofaer's concerns to Meese.

"Burns said the attorney general did not give him any facts and that he, Burns, was simply passing on the 'mysterious,' as he put it, assurance that all was well," Sofaer told Iran-contra lawyers.

That didn't satisfy Sofaer. He took his concerns directly to the White House legal counsel -- despite State Department misgivings about such a departure from standard bureaucratic procedure.

"Generally," he told committee investigators, "the whole thing smelled to me like the kind of thing you see in a trial -- and I've presided over hundreds -- in a narcotics case, for example, where they refer to the drugs as 'shirts' or something like that. You always have some kind of phrase that you use to describe what you're selling when you don't want to talk about it directly."

Ultimately, Sofaer threatened to resign if, as originally planned, Casey gave misleading testimony to the House Permanent Select Committee on Intelligence last Nov. 20. Backed by Shultz, Sofaer prevailed. The offending passage in Casey's proposed testimony was excised.

But Casey misled the committee anyhow. His ad-libbed testimony, released yesterday, shows that he returned to the cover story after reading his sanitized prepared statement.