For three years, the Carter administration pursued a foreign policy with diverse and sometimes competing goals and no clear priorities. But in the last three months, the administration has shifted to a reactive policy, tightly focused on a series of crises.

The single-minded concentration in November and December was on the Iranian crisis. A worldwide diplomatic effort with a single aim -- the release of the hostages -- was organized and put into effect.

Beginning Christmas week with the Soviet-induced coup and land invasion of Afghanistan, a competing and nearby crisis increasingly became the center of attention and policymaking, with a worldwide diplomatic drive tightly focused on countering the Soviet move.

Now the apparent election of Abol Hassan Bani-sadr as Islamic Iran's first president, the most encouraging sign in months of a possible break in the hostae crisis, is likely to bring Iran back to the fore of official concerns, at least temporarily.

Suddenly the international landscape, the rules and pattern of East-West competition, the expectations and attituded of leaders and followers and the fortunes of presidential politics all have been transformed too quickly for the mind to comprehend. Headline follows headline, and one jarring image is superimposed over another on the television screen so rapidly that the changes seem impossible to grasp.

The most far-reaching shift has been in East-West policy, the most basic element of American diplomacy. The SALT II accord to impose limits on strategic nuclear competition has been shelved. Washington has cut sales of grain and technology to the Soviets and is leading an international drive for condemnation and countermeasures against Moscow, including a pullout from the Summer Olympics.

In a policy tilt authorized by President Carter Jan. 4 and made public last Thursday, the United States has authorized sales of military equipment as well as militarily usable technology to the People's Republic of China, Moscow's archrival.

An American naval buildup relevant to both Iran and Afghanistan has taken place near the Persian Gulf, which the president has declared an area of vital interest that the United States will defend militarily. Naval and air facilities for U.S. forces are being sought throughout the Indian Ocean. Access to imported oil has become an explicit and central priority as well as the central economic problem of the United States.

In a policy reversal, a military alliance with unsteady Pakistan is being renewed. Future aid and military protection are being dangled before Iran, conditional on release of the hostages.

Carter is asking Congress to renew registration for the draft, and to take shackles off covert operations of the Central Intelligence Agency. The military budget is increasing sharply. For the first time since a brief flurry in the 1973 Middle East war, there is talk in the air of armed conflict between the United States and the Soviet Union.

"There has been a mood change within the government due to the events of the recent weeks a profound shift in internal thinking," said an official who has been deeply involved. "The policy machinery for the first time is working well. There have been no disputes of major substance, no cracks along the Soviet policy fault line as during the first three years of the administration.

"There are daily meetings at the top of government. There are assignments for implementation and follow-through. More is being planned and done than appears on the surface."

What has brought about the change in policy and outlook of the Carter administration? And why is it taking place at such a dizzying pace?

One fact of great importance is that the hostage-taking was the first foreign policy crisis of the Carter administration that involved the lives of Americans. Such a crisis focuses the mind as well as governmental machinery and imposes rigorous priorities and discipline.

In this case the powerful impact throughout the United States of the symbolic and emotion-laden events in Iran, amplified and personalized by simultaneous television coverage via satellite, added to the intensity of the crisis. If the hostage-taking was in this sense a hinge event -- as this reporter came, by late November, to believe it was -- the Afghanistan invasion determined the nature and direction of the policy swing. In the context of the seething anger and frustration of the long-running hostage crisis, any major international event could have touched off reactions more intense than might have been expected under ordinary circumstances.

The invasion of Afghanistan, a crudely executed takeover of a remote buffer state on the Soviet border that was already mostly under Soviet sway, resounded almost as if it were next door to the United States. This was partly because of Afghanistan's general proximity to the Persian Gulf but mostly because the invasion crystallized and reinforced long-standing concerns.

There was a sense that the soviets were on the march and the United States was helpless to stop them. The sense arose from the inability of the United States to counter effectively the Soviet-Cuban intervention in Angola and Ethiopia or to force the "unacceptable" Soviet brigade out of Cuba last September.

American vulnerability and seeming impotence were reinforced by the fall of the shah of Iran a year ago and the resulting cutback in international energy supplies leading to gasoline lines in mid-1979 and uncontrollable and sharply inflationary oil price increases throughout the year. "Suddenly the world was sticking a finger in our eye" said a State Department official.

Most of the recent actions, it should be noted, were extensions of U. policies already in motion or gaining support among elements of the bureaucracy and body politic. These included a U.S. military buildup, a tilt toward China, increased military presence in the Persian Gulf and unschackling of the CIA.

In this sense, "Afghanistan was a godsend," according to an administration official. "It gave point and opportunity for action to changes in thinking that were well under way."

Nobody can precisely assess the impact of timing -- the fact that the crises came near the star of a presidential campaign year. Certainly this was a factor. By coincidence, both Iran and the Soviet Union also are affected by their own leadership succession processes.

Having announced the broad outlines of policy in last Wednesday's State of the Union address, it is now Carter's task to fill in the details and make them work. From the beginning of his administration, the president tended toward policymaking by declamation. He placed less emphasis on and had less success with advance preparation and post-announcement follow-through.

As far as could be learned, none of the Persian Gulf countries was consulted in advance about Carter's unilateral delcaration that the United States would use military force, if necessary, to protect the security of the area. The responses have been lukewarm at best.

While such key countries as Saudi Arabia would welcome, in a narrow sense, a U.S. military response to an overt Soviet takeover threat, this is considered irrelevant to those nations' most important concerns -- creeping Sovite influence, political instability, Arab disunity. And as long as there is little progress toward and acceptable solution of the Palestinian question, an intimate and open association with the United States can be seen as anti-Arab and thus dangerous.

As in the case of the Persian Gulf, East-West perspecives and military response are not adequate and sometimes not appropriate to the problems confronting most of the nations of the world.

Disastrous economic stress, strident and rebellious minorities, the rise of fundamentalism in Islam and other religions in reaction to the shocks of modernism, all these are more powerful and basic problems in most of the world than U.S.-Soviet competition. Neither the Soviets have a means of exploiting local discontent through support of local radicalism.

Carter must decide how far he will take a policy of sharpened confrontation with the Soviets. The alternative to arms control and a search for restraint is unlimited military competition with higher tension and higher risks of war. The logical consequences include much larger military budgets, new drives for first-strike nuclear capability, abrogation of the treaty limiting antiballistic missle programs and a major U.S. civil defense program.

If the United States decides to be-devil the Soviets in Afghanistan, Angola, Ethiopia and elsewhere with covert or overt aid to insurgencies, the Soviets can be expected to reply with stepped-up aid to radical forces in the Middle East, southern Africa, Asia and Latin America. U.S. military aid to China can be matched by Soviet military aid to Cuba.

While a reactive foreign policy can give a satisfying sense of action, the danger is that it can lack clear objectives or a stragegy for their achievement. Administration officials, acknowledging that Carter's new policy demands a new framework, report that studies are under way to provide one.

Without such objectives and a well-developed and balance strategy, are-active foreign policy can bring a much more dangerous world in the 1980s. That is why so much is riding on the next phase of Carter's new policy, sketched out on Wednesday, to "face the world as it is."