On New Year's Eve 1978, Iranian Ambassador Ardeshir Zahedi threw a party for the western reporters gathered in Tehran to cover events as they approached their climax in 1979. Zahedi toasted the prospects for the shah's new government formed by Shahpour Bakhtiar and said it was "ready to roll," stocked with such well-qualified people that the opposition forces would accept the new regime.

One year before, Jimmy Carter had raised a New Year's toast to Shah Mohammad Reza Pahlavi as an "island of stability." Now the shah was yielding authority to Bakhtiar and would leave the country for a while, in the hope that things would settle down and the revolutionary forces would be satisfied.

Zahedi was, nonetheless, already undermining the Bakhtiar regime by emphasizing the continuity of the shah's regime. Bakhtiar begged Ambassador William Sullivan not to weaken his chances further by a public U.S. endorsement. Sullivan forwarded the request to Washington but it was ignored. The next day, Bakhtiar received a public blessing from the White House.

For the American government, the new administration in Tehran offered fragile hopes and, once again, for President Carter, it brought a swirl of conflicting advice and increasingly limited choices.

Originally, Carter was told by his national security adviser, Zbigniew Brzezinski, to stand by the shah to the bitter end. Brzezinski had been supported by the secretary of defense, the secretary of energy and a number of influential American friends of the shah.

But Carter's secretary of state, others in the State Department and some whose private counsel he had sought had argued that the United States must begin to establish relations with the political forces displacing the Peacock Throne, including even the aged ayatollah, Ruhollah Khomeini. According to Americans who had called on the ayatollah exiled in France, Khomeini might be willing to work out a peaceful transition.

The shah remained only as an important symbol. The underlying question, the one crucial goal left for American policy makers, was to make certain that the Iranian military remained intact and powerful, able to insure that the Iran of the future would continue with a pro-American outlook.

What was the best strategy for accomplishing that? To stand back and hope the Bakhtiar regime succeeded, without obvious help from America? Or should the United States put all of its hopes on Iranian generals who, after all, led forces equipped with the very best in American military hardware? With proper encouragement from Washington, could the generals still seize control of the troubled nation and enforce order, perhaps even restore the shah to power? Or should the generals be urged to begin negotiations with Khomeini on a peaceful solution?

The argument continued, in one form or another, through the first two fateful months of 1979. The entire world now knows the outcome. What is less well known is official Washington's lingering hopes for a different climax, in which a friendly, cooperative government remained in power.

Nearly everyone in the foreign policy apparatus agreed that the 400,000-man military was the central element in guaranteeing a U.S. future in Iran, but even the military, once thought to be fiercely loyal to the shah, was becoming a question mark. Some leaders wanted Khomeini's blood, but others were thought to be making overtures to him.

As arrangements were being made for the shah to leave Iran and for Bakhtiar to take the reins of a new government, one general, air force chief Manuchehr Khosrowdad, asserted that once the shah left, the communists were sure to take over. He said that no figure from the old National Front, such as Bakhtiar, was acceptable as a leader. Khosrowdad spoke openly of plans for a "coup" to keep the shah in power.

Bakhtiar moved to make himself acceptable to the military, but was unable to persuade Gen. Fereydoun Jam to return from exile as defense minister. Talk of coups continued. Khosrowdad and Gen. Gholam Ali Oveissi wanted a push that would destroy all opposition to the shah. Gen. Hossein Rabii and some of the younger generals were prepared to let the shah go but they wanted to wipe out his opposition and leave Bakhtiar fully in charge. Some wanted the military to take full charge, and keep the shah as a figurehead.

Each scenario by the generals required U.S. support, and, one by one, the military high commanders turned to the United States for assurances. Meanwhile, throughout Iran troops were being restrained less and less in dealing with demonstrators.

Back in late December, Brzezinski had proposed that the Uss Constellation with its 80 aircraft and 5,000 sailors and aviators be brought into the area to demonstrate a U.S. presence and commitment. The national security adviseer was articulating his "arc of crisis" thesis on Islamic unrest which reversed an interagency analysis originated by the State Department. Even if the State Department argument was correct that the Soviets were not the cause of the domestic ferment in Islamic countries, the United States must still act to insure that Russia will not capitalize on it.

Secretary of State Cyrus Vance argued that bringing forward the Constellation would simply reinforce the Soviet radio broadcasts to Iran that were predicting U.S. military intervention on behalf of the shah. Defense Secretary Harold Brown came down in the middle -- the carrier would be useful for evacuating Americans from Iran if that was needed but he too appreciated the provocative nature of the gesture. In the end, Carter sent the Constellation to the western Pacific and held it near Singapore.

President Carter had other problems on his agenda, including political problems. Press Secretary Jody Powell prepared a memo noting that January was supposed to have been a month of triumphs, but complications with SALT negotiations and the new Israel-Egypt treaty and the shah's troubles were beginning to mar the image of progress. The commitment to the shah was being widely questioned, the course of events in Iran being read as weakness. Powell had no remedies to propose, but sent a copy to Brzezinski.

At the State Department, Vance and his deputies generally tried to block the more provocative suggestions coming from Brzezinski and the National Security Council, but usually they regarded Defense Secretary Brown as an ally in caution.Vance was surprised, therefore, when Brown took the initiative and proposed an entirely new approach of his own.

The United States needed to know more about the shah's military high command, Brown noted. So he recommended sending a general of our own to Tehran, one with sufficient rank to impress the Iranian top brass. Brown's specialist, Robert J. Murray, who is now undersecretary of the Navy, picked Gen. Robert (Dutch) Huyser, deputy commander to Gen. Alexander Haig in charge of U.S. forces in Europe. Huyser had been in Iran to coordinate joint NATO and Iranian defense plans. He knew the members of the Iranian military hierarchy personally, and Brown thought he could act as a consultant to the generals.

Haig objected strongly, saying that Huyser was not qualified for a political mission and threatening to resign if Huyser was sent. At the White House, Haig's objections were ignored. Haig was to retire shortly anyway, and his frequent criticism of the Carter administration was finding its way into the press regularly.

Brown told the president that he should not put aside an earlier idea of sending a Cabinet-level envoy to bolster the shah; if anyone went, it should be Huyser. Carter approved the choice.

After instructions were brokered back and forth among departments, the general was told to assess the situation in Iran and make two requests of the shah's high command: Above all else, it should hang together, and, if at all possible, it should avoid a "military solution" and negotiate with the shah's opposition.

Huyser arrived in Tehran on Jan. 3. Almost immediately, he found that seven Iranian generals were set to take over the government as soon as the shah left. He met with all seven individually and then as a group. They expressed fear that Bakhtiar would not be strong enough to protect their interests and, in the face of more violent opposition, their lives. They planned to restore order.

Huyser argued that the only way the military could remain intact was to support Bakhtiar. The United States would stand by the generals, he said, only if they stood by Bakhtiar. They had no choice.

Several of the generals -- Oveissi, Khosrowdad and Rabii -- were difficult to dissuade. They had no faith in Bakhtiar; he would accommodate the opposition at their expense. They felt that only the military could block an eventual communist takeover. The military, they said, was prepared to wipe out the opposition leadership and, if necessary, to kill 100,000 Iranians.

They would not need Bakhtiar, they could put the shah back in power, if they chose, or run the country themselves. What they needed, they told Huyser, was the support of the United States.

Huyser was convinced the Iranian generals were afraid that a new regime would initiate investigations into corruption. Like many officials close to the shah, they had prospered handsomely under him. Huyser told them they would be allowed to leave the country if they chose, but that the United States was not ready to support military action. He warned that if they did act, they would be on their own. To avoid the turmoil that could lead to the dreaded communist takeover, they must support Bakhtiar.

Huyser stayed at Sullivan's embassy residence while in Iran. Unhappy with his assignment and receiving death threats almost every day, the general remained cloistered with Sullivan most evenings, arguing about the strength of the Iranian military.

Huyser was persuaded that the generals were powerful and could be kept together in charge of a unified force. But Sullivan was skeptical. He said that the military was on the verge of collapse, and that ordinary Iranian troops would probably not respond to commands to shoot their countrymen.

Each evening, after dining with Sullivan, Huyser called Washington, where it was still afternoon, and spoke to Defense Secretary Brown or the chairman of the Joint Chiefs of Staff, Gen. David Jones. He reported that the shah's command structure was intact, that it could reasonably rely on 80 percent of the troops for support, and that if the generals were unleashed they could crush the opposition.

Brown and Jones, in turn, told the president that the military could be used at any time on behalf of Bakhtiar or the shah or on behalf of another leader. The military option should be kept open.

But, at the same time, Sullivan reported to his superiors at State (or on occasion to Brown and Jones at the Pentagon) and presented a conflicting view. Sullivan was skeptical that the Iranian military would do anything in a crisis but fold. The time for a successful "crackdown" had long since passed. Caribbean Meeting

On Jan. 5 and 6, Carter met in Guadaloupe with French President Valery Giscard d'Estaing, British Prime Minister James Callaghan and West German Chancellor Helmut Schmidt. The French president recommended sending an envoy to urge the shah to leave Iran immediately.

Carter, uncomfortable with the French proposal, said he would not encourage the shah to go or stay, but that he would work with the British to facilitate the shah's departure in the near future. Callaghan and Schmidt agreed with Carter.

The Guadaloupe meetings lasted two days. Carter and Brzezinski stayed on for a third day and discussed Iran further, particularly the encouraging reports coming from Gen. Huyser. Brzezinski put heavy emphasis on Huyser's report that the Iranian military commanders remained powerful. He urged that plans to use force not be discarded.

Brzezinski again argued against communicating with Khomeini, saying it would be perceived as a rejection of the new Bakhtiar government and might panic the Iranian military leaders. The generals would never back Bakhtiar if the United States made a move toward Khomeini, and no meeting between U.S. officials and Khomeini could be kept secret, Brzezinski warned. Khomeini would announce it or leak it privately to show that America was capitulating to him.

Only a few days earlier, Vance had persuaded Carter to swing over and give permission for the private contacts with Khomeini. Now Brzezinski persuaded him it was a bad idea. There was no rebuttal from Vance; he was unaware of the discussion. The secretary of state was upset when he learned of the reversal but accepted it. Sullivan thought it was insane. Regime Collapsing

In Tehran, the situation was growing more confusing each day. The Bakhtiar regime, installed on Jan. 3, was already falling apart.

On Jan. 12, Sullivan turned down an aide's request to meet with Ayatollah Mohammad Behesti, the principal Khomeini contact in Tehran, on the grounds that it would violate the president's instructions against bargaining with Khomeini.

The next day, however, as things rapidly deteriorated, Sullivan desperately sought information on how Khomeini viewed the military. Without checking with Washington, he gave his approval to contact Behesti.

The embassy aide met with Beheshti (today head of the Islamic Republican Party, he was confused by the CIA with a merchant in the bazaar in a secret report published only six weeks earlier). The mullah was offered a deal. The United States would guarantee that there would be no coup or military crackdown if Khomeini would appeal to strikers to return to their jobs and call an end to the demonstrations, allowing Bakhtiar to rule.

Beheshti was direct. He said Khomeini would not bargain until the shah left Iran. If the United States could guarantee that the shah would abdicate -- and if he did actually abdicate -- then and only then would the strikes and demonstrations end, he said.

Beheshti said the shah's generals were not a real threat. They could have had a coup earlier or they could state one later on -- except, he said, no coup would succeed. The revolution would prevail regardless of the military.

Sullivan passed on Beheshti's views to Washington, figuring the offer was not entirely rhetorical. The proposal was discussed over breakfast by Carter, Vice President Walter Mondale, Vance, Brown, Brzezinski and presidential aide Hamilton Jordan. The answer was no; Carter would not ask the shah to abdicate.

On the night of Jan. 13, with the shah set to leave Iran any day, with the Bakhtiar government near collapse and with some Iranian generals on the verge of taking action on their own, Huyser once again filed his report to Washington, speaking to Harold Brown. When they were done, Brown immediately called Brzezinski.

Defense Secretary Brown reported that the arguments for the "military option," as he called it, were mounting quickly. Not only would it reassure allies on American steadfastness but it would solve another problem.

For one thing, Brown said, Huyser was no longer sure he could prevent a coup. At best, Huyser felt he could stop some officers from taking part, and the result of that would be for the action to fail. The united States would then be in an absurd position -- it would surely be blamed for starting the coup, when in actuality it would have been responsible for the coup's lack of success.

It made sense for Huyser to give the officers a go-ahead, Brown told Brzezinski.

Brzezinski then called Sullivan and Huyser at the ambassador's residence. Huyser assured him that the military could round up all the opposition leaders. Whether the commanders could be restrained from shooting them immediately was another question. One way or the other, further mass demonstrations would be unlikely, Huyser said. Sullivan, once again, took the opposite view.

For Brzezinski, it seemed only a question of timing and tactics. Should the military be unleashed with the shah in or out of the country? Should it be done to secure the bakhtiar regime or done later to restore the shah as regent?

Sullivan pointed out that no one outside the White House believed the Bakhtiar government could stay in power, and that the shah's chances were even more hopeless. He said that everyone had given up on the shah had given up on the shah. But Brzezinski wanted one more try.

Sullivan insisted as well that the military was too confused to be effective. It would self-destruct. Let the shah leave and then see what happened, Sullivan suggested. Brzezinski, for the time being, seemed mollified.

Since no one knew how Khomeini viewed the Iranian military, Vance authorized Paris embassy officer Warren Zimmerman to renew his secret contract with Khomeini's de facto chief of staff, Dr. Ibrahim Yazdi. So volatile was the struggle for influence around Khomeini that Yazdi insisted Zimmerman meet him secretly at an inn away from Khomeini headquarters. Each time Zimmerman contacted Yazdi, he used a prearranged signal, identifying himself as a reported named Shoemaker (his mother's maiden name).

In a series of seven conversations, Zimmerman posed questions to Yazdi, who relayed what he said was Khomeini's answer in their next Yazdi, who relayed what he said was Khomeini's answer in their next meeting. Khomeini would sell oil to any buyer at the "just" price, Yazdi reported. He would alllow U.S. investment, although he would be antagonistic toward the United States. But he would be even more antagonistic to the "atheistic" and "anti-religious" Soviets.

Yazdi had unsettling news. While Khomeini knew little about the Iranian military leadership, he was extremely hostile toward it. The Shah Departs

On Jan. 16, 1979, the shah left Iran. There were massive demonstrations and dancing in the streets of Iranian cities. Originally planning to go to the United States, where he was to reside at the estate of Walter Annenberg in Palm Springs, Calif., the shah's flight was re-routed to Aswan, Egypt, where President Anwar Sadat had invited him for a stopover.

Faced with continuing chaos in Iran, Vance and Brzezinski finally agreed on something -- the United States should maneuver to keep the shah in Egypt. Vance felt that the shah's presence in the United States was intensify anti-American feeling in Iran and serve to further damage the Bakhtiar government.

Brzezinski, however, felt the shah was still the key to rallying the Iranian military and that it was best for him to be nearby when the time came.

Indeed, Vance and Brzezinski were still offering the president fundamentally different ideas about what the future looked like in Iran. Brzezinski emphasized, as he had in the past, the threat of a communist takeover if Khomeini's religious fanatics should attain power. Vance, in contrast, argued that despite increasing concern over leftist radicals in neighborhood and worker organizations, Khomeini himself was staunchly anti-communist. The ayatollah might provide the best bulwark against a communist regime, even the possibility of cooperation with Washington.

Even after the shah's departure, Brzezinski's staff continued to discuss the possibilities for military action to keep the Khomeini forces from taking power. They had been in touch with Iranian generals who only awaited a favorable signal in order to launch a takeover of the government.

On Jan. 17, the day after the shah left Tehran, Capt. Gary Sick, Brzezinski's specialist on Iran, summoned State Department and CIA aides who had recently returned from Iran to the White House to see whether any of the various ideas for coups had any chance of success.

Brzezinski's aides were not prepared for the response they got. Support for the shah did not exist in Iran, they were told. In all probability, it would never exist. The key to weakening Khomeini's grip on the country was to let him take power. The populace would then learn that Iran's problems were not so easily solved. In the meantime, it made no sense to install or support a provisional government -- no one who might be able to lead Iran would seriously attempt to take power without backing from Khomeini. The country was his.

The United States, these analysts believed, should concentrate now on cultivating moderate Islamic clergy, such as Ayatollah Sayed Kazem Shariatmadri, and other middle-of-the-road elements in Iran, looking toward a coalition of military, social democrats, moderate clergy and supporters of the shah that would counter the more extreme groups surrounding Khomeini. This would take time, they added, because reliable links with these groups had been lost in the years that the CIA had depended on the shah's SAVAK for intelligence on Iranian dissent.

When Khomeini ran into trouble, this coalition of moderates could form the nucleus for a future government friendly to America. In addition, once the shah was gone, there was the potential for considerable internal strife from the various ethnic and regional groups, with whom the United States had lost contact during its years of close identity with the shah.

Meanwhile, Harold Brown at the Pentagon had a new idea to offer his personal representative, Gen. Huyser, who was pleading for permission to leave the country because of the death threats against him. Brown thought that restoring order in the southwestern oil fields was a priority and he proposed that Huyser organize a military takeover of the oil fields.With strikes in every sector of the economy from the civil service to the oil fields, Bakhtiar was presiding over a frozen society, his credibility rapidly evaporating. If the generals could get things running again, it would strengthen confidence in the regime.

Huyser tried to persuade the generals to proceed with Brown's mission, even if it meant putting troops at work on oil wells, but he couldn't get agreement. iAs soon as Huyser convinced one general, another would back off and insist on an alternative project.

Philip Gast, head of the U.S. military assistance group in Tehran, arranged a meeting with Medhi Bazargan, a member of the National Front who was close to Khomeini, and asked him for help in ending the strikes. Bazargan was unsympathetic.

Meanwhile, Gen. Haig continued to advise the Joint Chiefs at the Pentagon that the military should be pushed into action, with or without Bakhtiar. If the military did not move soon, before Khomeini's return, it would be too late. Secretary Brown again queried his man in the field: was now the time for a military takeover?

But Huyser was beginning to change his mind about the Iranian generals, having failed to get effective help on the oil fields. The military, he reported, had the power to take over the country -- but not the government expertise to run it. It would be better to back Bakhtiar. He was propping up the generals more the other way around. Khomeini Acclaimed

On Jan. 31, Ayatollah Khomeini arrived triumphantly in Tehran, greeted by tumultuous demonstrations.

After a final effort to insure the military's loyalty to the shaky government, Huyser finally got permission to return home.

Events began escalating out of control. Sullivan cabled that the fall of Bakhtiar was imminent.

At state, they worried what to say publicly. Bakhtiar was no longer viable, but to say so would precipitate his immediate fall. Huyser was briefing President Carter, Brown and Vance, insisting the military command was still intact and ready to put down demonstrations if Bakhtiar gave the orders. But elsewhere in government, sources were telling reporters that the regime was doomed.

When that story appeared on the evening news, Jody Powell promptly denied it. The president does not believe the Bakhtiar government will fall, Powell told CBS.

From the White House viewpoint, it was another instance of leaks making policy. Once the word was out to the press, the administration had to live with the results, whether the president liked it or not.

Carter told his appointments secretary to get a list from Brzezinski of the top State Department people and have them at the White House the next morning. Sixteen top-level officials appeared in the Cabinet Room the next day.

After praising Vance, Carter turned to his real concern. Leaks. He could no longer let those who had lost the policy arguments carry on their battles in the press, the president told them.

"This leaking has got to stop and what I am going to do in this," Carter said. "If there are any leaks out of your area, whatever the area may be, I am going to fire you. Whether or not that's fair, and I can see where some of you might not think it fair, this has just got to stop. So. Leaks from your area, regardless who's at fault, and you're fired." Leader Appointed

Later that same day, in Tehran, Ayatollah Khomeini appointed a prime minister for his provisional revolutionary government. It was Bazargan (as Sullivan had earlier predicted), Gen. Rabii, reminding everyone that the military did not wish to be left out of the final arrangement of power, had helicopters and aircraft flying over Tehran.

Bazargan recognized that he must establish authority over the military and he began meeting with some of the generals. Gen. Jam, whom Bakhtiar had failed to entice into his government, was offered a cabinet post. Gen. Gharabaghi talked with the revolutionary prime minister, then went to see the failing one, Bakhtiar. The general said the military's only hope of acting cohesively was to shift allegiance to Bazargan.

Bakhtiar now turned to Sullivan for advice. So the ambassador cabled Washington for instructions, proposing that he tell the fading prime minister to begin the peaceful transition to the new regime.

But the word came back: stay with Bakhtiar, tell Gharabaghi to withdraw his resignation, the United States still supports the Shah's prime minister. h

Three days later, a group of air force officers and enlisted men mutinied, took control of some tanks and attacked the headquarters of Bakhtiar's armed forces. Nineteen American military advisers were trapped inside. They were freed at 5 a.m. the next morning, only after Bazargan and Yazdi personally arrived to rescue them.

Gen. Rabii was preparing to launch a coup and take control of the government in the name of the military. Sullivan got a call from Washington that night, relaying a message from Brzezinski. Would a military coup succeed? Could they hold power against the revolution?

The ambassador responded with an unprintable expletive and asked: do you want me to translate that into Polish?

With no clear lines of authority, no reliable estimate of whose troops were loyal and whose had joined the revolution, Rabii and the others quickly declared their neutrality after only mild resistance. Most were arrested. The revolution had won.

Two days later, the U.S. Embassy in Tehran was overrun by supporters of Khomeini. Again only personal intervention by Yazdi freed the Americans.

On Feb. 27, Sullivan sent a cable to Washington saving that the embassy could no longer be protected, that antiAmerican sentiment was of a fever pitch. At least four of the most experienced Foreign Service officers stationed in Iran wrote memos saying that, considering the risk of attack, there were too many people stationed at the embassy. One suggested that the staff be reduced to six officers and a vicious dog.

The embassy staff was reduced to 40 or so, though it later grew again in size. On Nov. 4, 1979, revolutionaries, heeding a plea from Khomeini to rid the country of U.S. influence, overran the embassy and took hostage all of the Americans inside. Fifty-two of them are still there.