On Nov. 9, 1978, U.S. Ambassador to Iran William Sullivan sent an eyes-only capable to the secretary of state in Washington urging a major policy change toward the embattled shah. The revolution in Iran was growing, the shah seemed doomed, and the dominant figure emerging was the 78-year-old Ayatollah Ruhollah Khomeini, whose character and outlook were virtually unknown to American policy-makers.

Sullivan, once an enthusiastic booster of the shah, was now a convert to dire forecasts. He titled his cable: "Thinking the Unthinkable."

Others in the State Department who had persuaded themselves that the shah's new military government had prospects for success were jarred by Sullivan's pessimistic message. In it he postulated that if the new military government of Gen. Gholam Reza Azhari failed to subdue quickly the growing turmoil, the shah would probably not survive. With that in mind, the United States should begin contingency planning. Because U.S. interests are fundamentally to preserve the independence of Iran as an ally and because Iran was surrounded by a constellation of potentially hostile nations, a strong, effective, pro-American military was fundamental.

Therefore, plans should be made for putting the armed forces in touch with whatever new government was likely to emerge. Because any new government would not likely survive for long without Khomeini's approval, Sullivan urged Washington to prepare to meet secretly with opposition representatives most closely associated with the ayatollah to find out what he would accept to keep Iran's armed forces intact.

Sullivan believed that the first person to approach would be Mehdi Bazargan, an engineer who enjoyed Khomeini's blessing and was well regarded by all factions of the opposition -- the clergy, the bazaaris, the National Front and the workers. Unlike most of the other members of the National Front, he was untainted by old jealousies and internecine rivalries. One of Sullivan's political officers had met with him the week before. His views on social reform and civil rights were suited to Sullivan's notion of an appropriate head of state.

Because such an approach would be tantamount to a desertion of the shah, the substance of discussions with Bazargan would have to be totally secret. If the shah learned of it, it could be precisely the signal that would cause him to give up all hope. That, in turn, could leave a disastrous vacuum.

President Carter's reaction to Sullivan's cable was severe. He met with national security adviser Zbigniew Brzezinski and canceled the rest of his appointments for the day.

Why had he not been told that events in Iran were to the point where the U.S. ambassador was ready to abandon the shah? What was going on in the State Department, in the CIA, in the National Security Agency, in the Defense Intelligence Agency? Aside from a few references about the unhappiness of religious groups and radical opposition members with the shah, no one had warned him that things were this serious.

The president scrawled out a note to Brzezinski for each of his advisers -- Secretary of State Cyrus R. Vance, Defense Secretary Harold Brown, CIA Director Stansfield Turner and the head of the National Security Agency, Adm. Bobby Inman. Why had intelligence on Iran been so inaccurate? Or was Sullivan simply wrong?

On the afternoon of Nov. 13, Carter met with Brzezinski, his White House chief of staff, Hamilton Jordan, and Turner.

Turner offered an explanation. CIA resources had been cut so badly that they could not cover both the Soviet threat in the region and domestic politics. In addition, he mentioned the decision in the 1960s to rely on SAVAK, the shah's secret police, for information about the domestic political opposition in Iran. But mainly Turner blamed the mysterious aloofness of the Shiite clergy. The embassy political staff had been largely handling those contacts, he explained, and they had totally misinterpreted events. In short, the failure of intelligence was principally Sullivan's fault. Mixed Reports

Through November and into December of 1978, American intelligence reports and appraisals of the situation in Iran continued to be marked by what had become a steady pattern: the outlook for the shah was stable one day, his collapse imminent on the next. Brzezinski remained constant on the need to stand by the shah; advisers in the State Department were split.

Despite Sullivan's strongly worded cable, many members of his own staff in Tehran were unaware that their boss had lost confidence in the shah's chances of survival. They continued to send in reports that conflicted with Sullivan's own appraisals and, anxious not to create panic by broadcasting his own drastic shift in position, Sullivan did not stop them.

On Nov. 15, for instance, embassy political officer George Lambrakis and a visiting intelligence analyst from the State Department filed an encouraging report on their visit with the head of the 400,000-member teachers' union. They told Washington that this moderate opposition leader "would dearly love to follow conciliatory course which would permit shah to remain and reign, not rule, but government has closed down all efforts he and his group have made to publish or be politically active." The cable warned of a "crypto-communist" organization, a rival for teachers' loyalties.

This was the sort of evidence that Brzezinski regularly called to the president's attention -- a dispatch suggesting that the shah was not in as much trouble as the State Department was claiming and that communist influence was a major threat.

The shah had his own supporters chiming in on the Washington debate. King Hassan II of Morocco, a strong ally of the shah who was himself locked in conflict with Soviet-backed guerrillas, arrived in Washington and urged the president to give the shah his complete support, including military intervention on his behalf if necessary. How else could other allies be assured of U.S. support, Hassan asked.

The president took Hassan to be intimating that if the shah did not receive full U.S. support, Hassan and others could be expected to work against the administration's Arab-Israeli peace initiative. Carter sidestepped Hassan's suggestion, but assured him that all allies could count on the United States in time of crisis.

The same day, the president asked Senate Majority Leader Robert C. Byrd (D-W.Va.) to stop in Iran on a trip he was making to the Middle East and North Africa at the end of the month. Byrd's son-in-law was Iranian and the president could count on Byrd for a candid appraisal of the shah's position.

Later that day, the president also asked Treasury Secretary Michael Blumenthal to stop in Iran and make his own appraisal.

Sullivan had still not received a response to his "Thinking the Unthinkable" cable. He continued the contacts with the opposition on his own authority. Each week he authorized contacts with opposition members that were closer to the clerics and harsher on the shah. But his reporting still drew no response from Washington.

Lambrakis filed another hopeful report on the possibility for a moderate solution to the crisis:

"There are a variety of elements in the population who would dearly like to see some sort of compromise solution which would keep the shah and avoid a total victory for the Khomeini forces.

Many of these people are convinced communists will eventually manage to take over any successor government despite their relatively low posture in the opposition. Others want to avoid what they see as religious fanaticism."

The cable, signed as a matter of protocol by Sullivan, closed with an observation. "All recognize [the] key role to be played by the armed forces whatever the outcome of the present situation might be."

When Blumenthal lunched with the shah Nov. 21, he was a bit taken aback. The State Department briefing papers had told him the shah "remains in firm control and has stated categorically that he will not step down." But Blumenthal found the Iranian leader sullen and listless. As the cabinet officer tried to reassure the shah about American attitudes, the shah seemed not to hear.

When Blumenthal's gloomy report reached Washington, Undersecretary of State David Newsom decided to try again at the White House. He assembled three analysts who had recently briefed him on their tour of Iran and sent them to enlighten Brzezinski's staff on how bad things really were. The group, accompanied by Iranian desk officer Henry Precht, met with Brzezinski's deputy, David Aaron, and the NSC specialist on Iran, Navy Capt. Gary Sick, in the situation room of the White House.

The group from State explained that the question was not who was opposed to the shah, but who was for him, because that list was much shorter. But Aaron seemed unconvinced. He wanted to know who was organizing the trouble. It was clearly a small group that could be mollified or eradicated.

After the State Department group had spent an hour describing the total deterioration of support for the shah, Aaron interrupted Precht to ask a question.

"Tell me, Henry, exactly who is the opposition?" Aaron Asked.

"The people, David, the people," Precht responded tartly.

The State Department team left totally discouraged. They felt the White House was losing touch with reality in Iran.

Sullivan's cables from Tehran, meanwhile, took on a sarcastic quality that did not increase his influence at the White House, as he noted the comings and goings of Ardeshir Zahedi and the out-of-channel communications by Brzezinski. Who is the American ambassador, he wondered at one point.

From the White House viewpoint, Sullivan's ego undercut his effectiveness as an advocate for U.S. policy. One White House staffer said the president was tired of Sullivan's "smart-ass attitude and smart-ass cables."

But Byrd's personal report did not brighten the picture either. He informed the White House that he found the shah impotent to alter the course of his slide. 11th-Hour Efforts

While the president absorbed these reports, tremendous international pressure was being applied for a last-ditch effort to keep the shah in power.

The principal allies of the United States had an enormous stake in ensuring that Iran remained Stable. Japan, Israel, South Africa and several of the Western European nations were heavily dependent on Iran for their oil. Khomeini had announced that after the revolution Israel would get no oil from Iran and that all contracts with foreign firms would be canceled. That created a special scare in Japan, which was building a huge petrochemical complex in Iran. French firms had even larger contracts for construction of nuclear power plants. (Strikingly, the shah planned to make Iran independent of oil and develop a nationwide network of nuclear power plants by the turn of the century.) In all, the western European nations were said to have begun work on contracts calling for $12 billion in development at the time of the fall of the shah.

Because of their need for oil and their investments, some in the State Department felt, the Western powers believed the most likely method of maintaining stability was to keep the shah propped up.

In the same period. Energy Secretary James Schlesinger was worrying, not only that crippling strikes in the Iranian oil fields might interrupt the flow of oil, but would create another, more serious problem for the shah. Without oil revenues he could not pay for the recently promised wage increases. Without the wage increase, there would be more strikes. And intelligence reports warned that oil workers were now planning strikes over political demands, not wages and benefits. In short, economic collapse could bring down the shah. Decision Time

From all the competing voices, the president had to choose. What was the reality in Iran? And what could the United States do at this point to gain control over events?

When Blumenthal returned at the end of November with his personal report, he also had a business-like suggestion for resolving the internal debate: get an outside opinion.

Blumenthal told the president he had been shocked by the shah's demoralized appearance. He said Sullivan had told him to expect the shah to be downcast, but, at the same time, State briefing papers were declaring that the shah could regain control of events. Blumenthal questioned whether the latter opinion was sound. He advised the president to seek an outside appraisal, and recommended that Carter appoint George Ball, a former undersecretary of state and now a partner in a New York investment house, to conduct it.

Blumenthal's advice was seconded by Brzezinski, who told colleagues he was sure Ball would see things the same way he did. Ball arrived in Washington immediately and Brzezinski installed him in the Executive Office Building where he began sifting through all the intelligence reports he could find.

Ball, then 68 years old, had known many among the Iranian elite for 30 or 40 years and had traveled frequently to Iran. Years earlier, he had heard firsthand of the frustration with corruption under the shah and had thought the shah's penchant for advanced weaponry to be irrational.

Whatever new evidence Ball needed to reinforce his suspicion that the shah's days were numbered, he got from a series of confidential briefings from analysts at the State Department and elsewhere. The portion of Sullivan's cable traffic that Ball was allowed to see yielded a similar view. Iran analysts from State Passed on other cable traffic and memoranda that they knew Ball had not yet seen. Even Brzezinski's own aide, Sick, agreed that the Shah was done.

From the reports he read and conversations with administration aides, Ball rapidly came to the conclusion that the shah could not be saved. He seized on the possibility of installing the National Front in power, despite the CIA reports citing the weakness of the Front.

On Nov. 30, the CIA issued a top secret intelligence report on the shah's opposition, dealing mainly with the National Front, which it referred to as "a wide range of parties from moderates to radical leftists but not communists." The Front was described as too divided probably to provide Iran with effective adminstration.

Correctly, the CIA noted that "it is Khomeini who has the largest backing among the demonstrators and rioters who have plunged Iran into chaos," and that "most leaders of the Front have moved closer to the hardline views" of Khomeini. "It is the religious leadership that can bring out the demonstrators and mobs, not the National Front." But the CIA added that the Iranian military would "play the pivotal role in future political developments in Iran."

Ball chose to ignore the CIA warnings that "ideological and personal fueds, some decades old, weaken its cohesion and have damaged its ability to negotiate during the current disorder. The National Front has not put forward a formal program other than calling for the return of the 1906 constitution [which would make the shah a constitutional monarch with limited powers]," a top secret intelligence memorandum said.

But if the Front seemed ineffectual, it was also the safest alternative. For Ball, the National Front consisted largely of constitutionalists, human rights advocates, commited to self-determination over Iran's oil assets, and nonaligned in their foreign policy. No doubt the rhetoric of Anti-Americanism would outstrip any statements of support for U.S. values. aBut Ball reasoned that American support for their independence would swing them back into the U.S. camp.

The Iranian specialists at State were pleased that Ball also concluded that the shah could not continue in full authority; they were disturbed at Ball's recommendation that the shah retain his throne and control over the military. The CIA had just reported that Khomeini would never accept that arrangement. Brzezinski was unhappy for other reasons.

Citing recent intelligence predictions that Iran would almost certainly be overwhelmed by violence during the Moharram holidays and the shah probably would be toppled, Brzezinski stressed that such bleak reports could not be trusted. The violence hadn't occurred. The shah hadn't fallen. His point was supported from an unexpected quarter -- Sullivan cabled that the shah had survived the worst. "The immediate political crisis has passed," it said, according to sources.

At a presidential news conference Dec. 12, Carter expressed the same outlook. "I expect the shah to maintain power in Iran and for the present difficulties to be resolved," the president said. "The predictions of disaster that came from sources have not been realized at all. The shah has our support and he also has our confidence." The president added critical remarks about Khomeini and Soviet ambitions in the region.

When Ball asked for a meeting with the president, Brzezinski was slow to push the request through, apparently hoping to delay the report's arrival on the president's desk until he had had an opportunity to append his own remarks to it. Ball could not turn to Vance, who was in the Middle East desperately pushing for a peace treaty, but, wise to the ways of White House politics, Ball arranged his own appointment.

Finally, on Dec. 13, Ball met with Carter. He told the president that the shah, like Humpty Dumpty, could never be put together again because there had been a "national regurgitation by the Iranian people." Even the professional and middle classes were now against him. What the United States had to do, Ball said, was work out the transfer of power to "responsible hands before Khomeini comes back and messes everything up."

Ball recommended that a "Concil of Notables" be established, consisting of prominent citizens from all sections of the opposition except the Marxist left. The council, not the shah, would pick the leaders of a new government. Ball offered a list of 40 to 50 "notables," mostly elderly, moderate leaders from the early 1950s, when the National Front was at its most powerful.

Ball warned that Brzezinski's hard-line "crackdown" approach could not succeed. Army troops might refuse to fire at demonstrators, he said, leading to the disintegration of the military. If the military did hold together, then there would be massive, bloody confrontations leading to prolonged civil war.

One way or the other, Ball told Carter, the shah should be told he ought to leave the country for awhile and begin to share power with others. It was the only way he could avoid letting the country fall into the hands of communists and religious extremists. Ball did, however, recommend that the shah could continue as regent and as commander-in-chief of the armed forces.

"I can't tell another head of state what to do," Carter responded.

"You can tell a friend what you think," Ball retorted. "One of the obligations of friendship is to give advice, particularly to a man who is cut off from the normal sources, who is surrounded by syncophants and out of touch with his people."

Carter wouldn't budge. Ball departed for a Florida vacation. A Proposal

Afterward, Brzezinski, unhappy with Ball's recommendations, once again made his case for standing by the shah. The shah had made it through the most dangerous holiday period; he could ride out the protests. The "Council of Notables" made no sense, Brzezinski said, because the National Front leaders were weak, had no popular support and no respect from the military leadership. The result, Brzezinski said, would be a crumbling at thhe first push from Iranian communists or an aggressive move by the Soviet Union.

Furthermore, Brzezinski said, only the military could meet a threat from Khomeini, and, from all appearances and intelligence reports, the military was still intensely loyal to the shah. What the shah needed from the president was a clear signal that the United States would back him to the end. That would serve a double purpose: It would let the allies know that the United States kept its commitments, and it might prod the shah to seize the opportunity to crush the opposition.

According to sources in the State Department, Brzezinski then drafted a letter for the president to send the shah, which unambiguously urged him to use force to put down the domonstrations. The letter, three sources said, spoke of issues of greater importance than liberalization of Iranian society.

A draft of the letter was sent to Vance for State Department comments; key aides to Vance were shocked by it. The result of the letter, one aide feared, might have been "1,000 deaths." Others thought in terms of tens of thousands of deaths.

Vance spoke to the president immediately, according to these sources, and said he wanted to be sure that Carter understood that language of the draft would likely be interpreted by the shah as an invitation for massive violence against his people. According to State Department sources, Vance told Carter that the idea was dangerous on several counts. If the shah accepted the advice, a confrontation with civilians could turn into a lengthy civil war or lead to a breakdown of the Iranian military, if troops balked. Vance feared these possibilities could only play into the hands of Iranian communists and perhaps the Soviet Union as well.

And if the shah did not accept the advice, but abdicated, the letter could create a disaster for U.S. interests should it fall into the wrong hands.

Carter, according to State Department sources, told the secretary of state that he was willing to take the responsibility. He felt it was important for the shah to know that the United States was unambiguously behind him. According to these source, the president believed that the shah had a new lease on life and should take advantage of it immediately.

Vance suggested changes in the draft to make it slightly more ambiguous, which were accepted. The White House now says the message was never sent.

At one point in early 1980 durning the hostage crisis, Carter asked for the compilation of a documentary history of U.S.-Iran relations, in preparation for Iranian demands for an accounting on the U.S. role in the Persian Gulf nation. But when the study task force asked for presidential documents, the White House refused certain documents, including the draft letter. The gathering and analysis of the "Iran papers" was shifted to Brzezinski's office and suspended. Vance's copy of the revisions is now missing from his office files at the State Department.

In any case, advice from Washington had no impact on the shah's decisions. He did not order crackdown. A Retort

In Tehran, Sullivan was not consulted about the draft letter, but he was infuriated by Zahedi's representations of U.S. policy, by the president's refusal to approve contacts with the opposition, by Brzezinski's persistence in backing the shah.

Having pushed for overtures to be made to Khomeini's representatives and for Washington to ease the shah out of power, Sullivan fired off a cable home saying that the president's policy was "shortsighted and did not understand where the U.S. interests lie," according to a State Department source.

For months, State Department officials had warned Sullivan that he was on thin ice with the White House, that Brzezinski and to a lesser extent the president felt that his cables were impudent and improperly critical of the National Securtiy Council and Carter. The new cable got Carter's attention.

"Pull him out," the president ordered Vance, according to State Department sources.

Vance objected. Firing Sullivan would make it appear that the United States was deserting the shah.

Carter was adamant; he said he wanted Sullivan's "ass."

Vance suggested that, instead, undersecretary Newsom be sent to Tehran to give Sullivan an official but private reprimand. Finally, the president relented.

As it turned out, Newsom was too busy to make the trip. Sullivan stayed on the job, unaware that the president wanted him fired, as events in Iran headed toward the climax.