In the fall of 1985, CIA Director William J. Casey invited Bernard F. McMahon, staff director of the Senate Select Committee on Intelligence, to his Langley office for a talk. McMahon, a retired Navy captain, had served as executive assistant to Casey's predecessor, Adm. Stansfield Turner. Casey, more than four years after succeeding Turner, still had lots of questions about Turner, how Turner had run his office, his attitudes, his people. He wanted an evaluation, past and present -- total candor. Aren't the people here wonderful? Casey asked.

McMahon agreed: high quality, lots of brains.

"Why do you think they do what they do here?" Casey asked in dead earnest. "Why do you think they're here? What's it all about, really about?"

The excitement, patriotism.

"No, no, no," Casey said. "We have a chance to establish our own foreign policy. We're on the cutting edge. We are the action agency of the government."

Casey went for a physical exam that fall. Things were not right, he knew. The diagnosis was prostate cancer, and his chances for survival were complicated by his age, 72, and whether the cancer had spread. He asked for all available literature on the disease and soon agreed to an intensive regimen of daily radiation and chemotherapy treatments. He shared this awful news with his wife, Sophia, but decided that no one at the Central Intelligence Agency or within the administration was to know. But Casey told the president himself.

He knew now that there was no limitless timetable. Things had to get going.

Casey had already taken intelligence operations "off the books" in conjunction with the Saudi intelligence service, first with an unsuccessful operation to assassinate Sheik Mohammed Hussein Fadlallah, leader of the militant Shiite Moslem faction in Beirut known as the Hezbollah, and then a successful effort to bribe Fadlallah with $2 million of food and medicine to stop the bombings of American facilities.

Operating "on the books," Casey had finally won presidential approval for a covert operation to undermine the Libyan regime of Col. Moammar Gadhafi. The congressional intelligence committees had been properly and fully informed, but many members had raised objections that support for the anti-Gadhafi exile movement, which wanted Gadhafi dead, was precariously close to involvement in the banned assassination planning. Casey felt the operation was designed only to stop terrorism, not assassinate. But the operation leaked.

Casey went to see the president and slapped down on his desk a newspaper containing the story. "See," the director of central intelligence said, "I told you congressional oversight can't work. Those bastards all leak."

The president wrote the intelligence committees a two-page letter, stating without qualification that the committees had leaked, and that it was an unscrupulous way to stop a covert action. The leak itself is just about the worst thing that ever happened to national security, and it threatens congressional oversight, the president said. He virtually accused committee members of treason.

The committees denied leaking, saying that the initial story in The Washington Post contained quotes from a top-secret document that neither committee had seen.

Then the relationship between Casey and the congressional committees went from bad to worse. The committees, never happy with Casey, found new and grave cause for further distrust. In early November 1985, KGB defector Vitaly Yurchenko, who had come to the CIA that summer, bolted from his CIA handler in a Georgetown restaurant and returned to Moscow. Before departing, Yurchenko leveled an embarrassing barrage of publicity at Casey and the CIA. The intelligence committees gave Casey hell publicly and in private.

To make matters almost unbearably complex, Yurchenko had provided information that led to the unmasking of two men who were spying against the United States: former CIA officer Edward Lee Howard, who had betrayed many CIA assets and operations in Moscow, and Ronald W. Pelton, who had sold vital secrets on communications intelligence eavesdropping operations conducted by the National Security Agency against the Soviets.

Casey had had it with the committees. It was, in some respects, an easy call when he forwarded to the White House a draft presidential order, or "finding," on Iran that retroactively authorized the CIA to assist in shipping arms to Iran as part of an exchange for the American hostages in Lebanon. The finding directed Casey "not to brief the Congress of the United States" on the operation.

The Iran arms sales stayed secret for almost a year, until early last November. Then, a Lebanese magazine disclosed one aspect of the operation, and the floodgates opened. Casey was called to Capitol Hill to explain the operation.

At 9:30 a.m. last Nov. 21, Casey appeared in a top-secret session before all 15 members of the House Permanent Select Committee on Intelligence. There was much unhappiness. After Casey read a 10-minute summary, Chairman Lee H. Hamilton (D-Ind.) unequivocally challenged Casey's view that notification of covert action could legally be delayed about 10 months. Casey responded coolly, "We are talking about a constitutional prerogative which presidents have claimed . . . . I think it was a bona fide attempt in which the things we committed were rather small and certainly proportionate to the magnitude of the things we were trying to achieve." The kind and amount of weapons sold, he said, were insignificant.

"You've got to take those risks, or sit and let the world go by," he said. "I personally was in favor of taking the risks in a cautious and prudent way.

"I wouldn't now be willing to say I wouldn't take the risk if I could do it over again."

Some Republicans jumped in, defending the president's decision, and arguing that the committee leaked. Rep. Dave McCurdy (D-Okla.) asked, "Who managed the operation, Mr. Casey?"

"I think we're all in it. It was a team." The national security adviser was Vice Adm. John M. Poindexter.

"Who headed the team? Who called the shots? Was it Poindexter or Casey?"

Casey replied, "I think it was the president."Contra Diversion Disclosed

Four days later, Attorney General Edwin Meese III disclosed at a nationally televised news conference that some profits from the Iran arms sales had been diverted to aid the Nicaraguan contras.

The next day, Nov. 26, I reached Casey on the telephone to ask how the administration became involved with the arms sales to Iran.

"The Israelis, in '81, were telling us to work with the Iranians, for the purpose of getting close to the military," Casey said. "It seemed credible to us, based on the future, post-Khomeini era," he said, referring to the Iranian leader, Ayatollah Ruhollah Khomeini.

Why were there profits that could be diverted to the contras?

"Iran was willing to pay more," he said, and suggested that any "illegality" found would be on the part of others.

Who?

He paused. "Poindexter just got caught."

Did you know about the diversion to the contras?

"The law said I had to stay away," he said, reiterating what Meese had said at his news conference, that no one at the CIA knew, including the director.

The contras are your boys, you must have had a clue that they were getting $10 million to $30 million?

"Gossip," he snapped. "I learned yesterday of it for sure from Meese."

You didn't know what the key National Security Council aide, Marine Lt. Col. Oliver L. North, was doing?

"Goddammit -- no one will go to jail . . . inside the Beltway." He hung up.

On Monday, Dec. 15, Casey was in his seventh-floor office at Langley preparing for an appearance before the Senate intelligence committee when he suffered a seizure. An ambulance rushed him to Georgetown Hospital. He had another seizure, but was speaking and moving normally. On Thursday at 7:40 a.m., he was taken into surgery, and a three-member team operated until 1 p.m., removing a cancerous soft tumor called a lymphoma. It was scooped out from the inner side of the left brain, the area controlling movement of the right side of the body. In a statement, his doctors said they expected that the 73-year-old Casey would be able to resume his normal activities.

Robert M. Gates, Casey's deputy, took over as acting director of central intelligence. He spent much of January resisting White House pressure to suggest a replacement for Casey, who was seriously ill and virtually unable to speak. Forced to come up with names, Gates proposed former senators John Tower (R-Tex.), Paul Laxalt (R-Nev.) or Howard H. Baker Jr. (R-Tenn.). None of them would come in and tear the place to shreds, he hoped.

After six weeks, Casey improved dramatically. On Wednesday, Jan. 28, Gates was allowed to visit him in the hospital.

Casey was sitting by the window. He never had much hair, so the hair loss from radiation and drug treatment was not that noticeable. Gates had a list of subjects to cover, and he began. Casey was lucid, making short comments or grunting as Gates moved down the list.

"Time for me to get out of the way," Casey finally said, waving his left arm in the air, "make room."

The next day Gates arranged for White House chief of staff Donald T. Regan and Meese to visit the hospital. Casey couldn't write, so his wife, Sophia, signed his resignation letter. He had served six years and one day. 'Key Unanswered Questions'

I took a list of persisting questions, added some from previous years and drove to Georgetown Hospital. Two unusually heavy snowfalls had blanketed Washington in the latter part of January and traffic was thin. I didn't have to wait long in the lobby to see one of the telltale CIA security men with his walkie-talkie earpiece. He went down a long corridor, turned left into a new wing and took the elevator. It stopped at the sixth floor. I went up. In a small room, four CIA security men were watching afternoon television.

Casey was in Room C6316, registered under the alias "Lacey." The door was closed, and after I identified myself, the lone security man declined to let me in.

Each time I had interviewed Casey over the previous three years, I had written out my questions on sheets of yellow legal paper. I had saved all these sheets and now had a thick packet of many folded and old pages. Some questions -- asked, answered by Casey and verified elsewhere -- now only prompted more curiosity. As I spent several hours reviewing what I might want to ask, I attempted to condense it to one page: "Key unanswered questions for Casey."

More than ever it was evident how preeminent this man had been to the Reagan administration's aspirations and predicaments. As much as anybody, even the president, it was Casey whose convictions, fierce loyalties and obsessions were behind the contra operation, the Iran initiative and the range of other secret undertakings and clandestine relations. His view of the law -- minimum compliance and minimum disclosure -- had permeated the Reagan foreign-policy enterprises. His ambition had been to prove that his country could do "these things," as he once told me. He meant covert actions conducted in true, permanent secrecy. It was part nostalgia. It was also part a demonstration of will.

"We could win," he once said longingly to a top assistant. He felt his big accomplishment had been to prevent Central America from going communist, much like America's post-World War II achievement in saving Western Europe from the communists. Sophia Casey told me in a phone conversation, "From the head and the heart, Bill was a born patriot."

Was he? Was that what it was about? His country at any cost? What price had been paid? Now that the game was about over, I realized that I could not escape making a judgment. I had scrupulously avoided that for the 3 1/2 years I had known him. It was easier and safer for me that way. For some reason we had formed a partnership over secrets. During this game, secrets were the exchange medium. What were the secrets? What was their value? What was their use?

He had been an attractive figure to me because he was useful and because he never avoided the confrontation. He might shout and challenge, even threaten, but he never broke off the dialogue or the relationship. In 1985, when The Washington Post had exposed that the CIA was training Lebanese teams to make preemptive strikes against terrorists in the Middle East, he had said to me, "You'll probably have blood on your hands before it's over." That was, I later learned, after Casey had worked secretly with the Saudi intelligence service and the Saudi ambassador in Washington to attempt to assassinate Fadlallah. Instead of Fadlallah, the car bomb had killed 80 people.

How did he square that? I imagined, and hoped, he felt the moral dilemma. How could he not? He was too smart not to see that he and the White House had broken the rules, probably the law. It was Casey who had blood on his hands.

The institutional questions about the White House, the CIA, Congress, the political temptation of covert action, the war-making authority and the awful fakery of "plausible deniability" would be addressed by those investigating the Iran-contra affair. I kept coming back to the question of personal responsibility, Casey's responsibility. Events and disclosures would not take him off the hook; they would, most likely, put him on it even more. For a moment, I hoped he would take himself off the hook. The only way was an admission of some kind or an apology to his colleagues or an expression of new understanding.

At the end of "Key unanswered questions for Casey," I wrote: "Do you now see that it was wrong?"

Several days later I returned to Casey's hospital room. The door was open. Scars from the craniotomy were still healing. I asked Casey how he was getting along.

Hope and then realism flashed in his eyes. "Okay . . . better . . . no."

I took his hand to shake it in greeting. He grabbed my hand and squeezed.

"You finished yet?" he asked, referring to the book.

I said I'd never finish, never get it all; there were so many questions. I'd never find out everything he had done.

The left side of his mouth hooked up in a smile, and he grunted.

Look at all the trouble you've caused, I said, the whole administration under investigation.

He didn't seem to hear. So I repeated it and for a moment he looked proud, raising his head.

"It hurts," he said, and I thought he was in physical pain.

What hurts, sir?

"Oh," he said, stopping. He seemed to be saying that it was being out of it, out of the action, I thought. But he suddenly spoke up, apparently on the same track about the hurt. "What you don't know," he said.

In the end, I realized, what was hidden was greater. The unknown had the power, he seemed to be saying, or at least that's what I thought. He was so frail, at life's edge, and he knew it, making a comment about death. "I'm gone," he said. I said no.

You knew, didn't you, I said. The contra diversion had to be the first question: You knew all along.

His head jerked up hard. He stared, and finally nodded yes.

Why? I asked.

"I believed."

What?

"I believed."

Then he was asleep, and I didn't get to ask another question.

A few weeks later, Sophia Casey took him home, but he was soon back in the hospital. She finally took him home to his estate, Mayknoll, on Long Island. He contracted pneumonia and was hospitalized. There, on the morning of May 6, the day after Congress began its public hearings on the Iran-contra affair, Casey died.Barbara Feinman, of The Washington Post, was research assistant for "VEIL: The Secret Wars of the CIA, 1981-1987,"

1987 by Bob Woodward, published by Simon and Schuster Inc. All rights reserved.