WHEN SERIOUS CONFLICTS arise between Washington and Moscow, we tend to search for elaborate causes, for motives large enough to match the effects. Such was the case following the Soviet invasion of Afghanistan, which prompted U.S. fears that the Red Army was headed toward the Persian Gulf and its oilfields.

But there is another explanation, pieced together from a series of conversations over the past year and a half with both American and Soviet officials and offering new information. This explanation suggests that whatever Moscow's ultimate strategic intent, the immediate Soviet reason to occupy Afghanistan had less to do with grand designs than with misunderstandings, on their side and ours.

First, the event that might have triggered the Soviet invasion was the massacre of a Soviet military delegation in Afghanistan. The decision reflected not an emotional reaction but the imperial logic of control and retribution, piously disguised as peacemaking.

Second, the timing of the Soviet invasion, in the last days of 1979, was based on the expectation of an imminent American military action to free our hostages in Iran. Soviet leaders calculated that the international outcry over their move would be muted by protests against the U.S. intervention next door.

The Soviet military mission that was ambushed by Afghan tribesmen numbered at least 35 officers (the estimate of a high-ranking American official) -- and possibly more than 50 ("more than the American hostages in Tehran," according to one Soviet source who was expressing his indignation over "all the fuss" because of the hostages "who are, after all, still alive and not likely to be killed.") The victims, many of them generals and colonels, had been sent in September for an in-depth study of several weeks, to advise the Marxist government then headed by Hafizullah Amin on the best ways to reverse its deteriorating position against the insurgents. They had made no secret of their contempt for the Afghan army, then melting away -- down to 40,000 men from 120,000 six months earlier -- and selling their weapons to the rebels.

When news of the massacre reached Moscow, it brought to a head a debate which had begun in March, when about 20 Soviet military advisers and some civilians were killed and mutilated in disturbances in the town of Herat. As the insurgents became more active and regular Afghan soldiers began deserting in large numbers, incidents of Soviet advisers being picked off by snipers increased. Dispatching the Red Army into Afghanistan seemed a natural solution to Russians raised on the stories of imperial expansion by fighting banditry in the Caucasus and Central Asia.

Arguing against delay, one group invoked the time-honored principle of great power honor: A provocation by lesser breeds must not be allowed to go unpunished and the retaliation must be more severe than the offense. Clearly, only a complete Soviet takeover could guarantee the safety of Soviet advisers and save the Kremlin's position of preeminence in that vital salient in South Asia.

Soviet officials in Afghanistan had strong suspicions that Amin had a role in the massacre, if he didn't actually arrange for the ambush which, as one source put it, resulted in "decapitation and worse." Important voices in and out of the Red Army were raised and though news of the massacre did not appear in print, its import suggests a parallel with British reaction in 1756 to losing 123 of their own in the Black Hole of Calcutta -- an alleged massacre which led to eventual British rule over India.

A second argument for an invasion focused on Amin's unreliability as an ally, accusing him of systematically eliminating some of Moscow's favorite Afghan communists and maintaining secret contacts with Islamic militants in Iran.

One senior American diplomat observed that "Amin had Brezhnev's build, but with Tito's mind and ambitions." U.S. diplomats acknowledge that a few weeks before the Soviets surrounded the presidential palace with tanks and deposed him, Amin had sent signals of his desire to improve relations with the United States and to distance himself slightly form the Soviet Union.

The Khomeini fever must be contained in Afghanistan, Soviets arguing for Amin's removal declared, contending that a show of Soviet strength in Afghanistan would send a necessary message of toughness to Iranians, Pakistanis and Indians, as well as to Soviet Central Asians. When discussing the judgment of Western press and intelligence that Soviet Moslems were not responding to Iran's Islamic resurgence, one savvy East European remarked: "The problem is that the Soviet analysis comes up with the same finding. But it is that lack of response that worries the Russians: They don't believe it for a moment."

Concerned with political fallout in Iran and in the West, and a procrastinator by nature, President Brezhnev delayed action in Afghanistan throughout the fall of 1979. What he is said to have feared most was that an invasion would destroy whatever was left of detente -- an accomplishment he took credit for.

But the attack on the U.S. embassy in Tehran created a new situation.

As soon as the crisis broke out on Nov. 4, President Carter was weighing a variety of military options, promising the liberation of the hostages. Domestic opinion strongly favored "doing something" and would have applauded a show of force, but experts sharply disagreed on the military feasibility and diplomatic wisdom of "something drastic." The disagreements recalled earlier arguments about the American capacity to influence events before, during and after Iran's Islamic revolution.

Carter could not make up his mind. One day he appeared to favor the use of force recommended by some of his aides and military experts, the next day he leaned toward the patience and diplomacy advised by the State Department.

Rumors were circulating in Washington that some sort of special operation was in the works. A number of of officers with expertise in commando action and with experience working with the Iranian military were flown into Washington for consultations; others were told to be ready to come on short notice. The word spread in the military that "something big is afoot" and there was talk of occupying oilfields and refineries, bombing oil installations, an Entebbe-type commando raid (possibly with assistance said to have been offered by Israelis), even the threat of a nuclear strike. At the same time, any enterprising reporter in Washington could pick up a story about one or another of the mediation attempts, some of them far-fetched and all of them exotic, coordinated by Carter's trusted lieutenant, Hamilton Jordon.

Soviet America-watchers came to the conclusion that Jordan's secret trips to Paris were a smokescreen and that Carter would act, most likely through a U.S.-sponsored military coup in Tehran.

"We simply cannot believe that Carter is serious about following up on some of these mediation offers," Soviet diplomats remarked at the time. (In April, the same sources described themselves as astonished when hearing of the ill-fated rescue mission. "We just couldn't believe that the Americans would hatch a plan as stupid," they said.

By the end of November, a third argument gained strength in the Kremlin: American intervention in Iran would provide the perfect cover for Soviet intervention in Afghanistan because international reaction would be directed against the Americans as much as the Russians. "It was a chance for a linkage that the Russians would have been foolish to miss," an East European source observed. "And the Afghan situation was getting out of control." Soviet diplomats were ready to explain the occupation of Afghanistan as a preemptive strike necessitated by the American thrust in the area.

Except for the first Security Council vote in November calling on Iran to return the hostages, the Soviets worked against every American effort at the U.N. to put pressure on Iran. In Tehran, the Soviets sabotaged an attempt by resident diplomats to protest the seizure of the hostages as a violation of diplomatic immunity. The dean of the corps, who happened to be the Czechoslovak ambassador, first stalled, then actively prevented an en bloc protest sought by America's European allies.

Relations between Washington and Moscow hit rock bottom by the beginning of December, following U.S. determination on deploying Pershing missiles in Europe and an increasingly hostile Soviet attitude toward American efforts to rely upon Iranian moderates to help free the hostages.

As the year was drawing to a close, the Soviets stepped up their radio campaign in Iranian languages charging "ceasless" American preparations for an armed intervention in Iran. U.S. officials protested privately and then publicly about the scurrilous and mischievous nature of the Soviet propaganda. They received the response that the broadcasts were meant to underline the seriousness of the Russian warning against U.S. interference in Iranian affairs.

Beginning in September, American officials repeatedly had asked for an explanation of troop concentrations in Soviet Central Asia and cautioned the Soviet government against moving troops into Afghanistan. They received no response.

According to knowledgeable Soviet sources, Brezhnev's Christmas Day order for the Red Army to roll was based on the intelligence that within days the Americans would "do something drastic" in Iran. When the U.S. action failed to materialize, one Soviet diplomat in Washington exclaimed, "Carter doublecrossed us."

One senior State Department analyst contrasted the clockwork precision of the Soviet military plan with the confusion and even improvisation in their diplomatic demarches. "The Russians bungled their diplomatic work," he said a few weeks after the invasion. For instance, early Soviet explanations claimed that Amin had called in the Red Army -- a lie that angered Carter and prompted his much-quoted statement that the invasion of Afghanistan had revealed to him the real nature of communism. The Soviets have never delivered on their promise, made in a number of capitals after the invasion, of a "white book" proving that Amin was a murderer and an agent of foreign powers.

With Soviet troops in control in Afghanistan, the State Department was more hopeful than ever that such a nacked act of Soviet aggression against a neighboring brother Moslem state would persuade the Iranians of the folly of maintaining a feud with the United States. "What the Soviets did in Afghanistan may unblock the hostage crisis" was a sentiment frequently expressed. But the weeks passed, and once again the mullahs proceeded to ignore political reality as defined by Americans.

From the beginning of the Iranian revolution, the American concern has been that underneath the mullah's garb is a red commissar, while the Russian concern has been that the mullahs are in fact born-again CIA agents. U.S. specialists have never gotten over the shock of having neglected the cultivation of contacts with Islamic militants. The Russians still cannot forget that in the early 1950s, the CIA was actively searching for "a Moslem Billy Graham" to line up Islam's faithful against the godless communists.

From the summer of 1979 on, the Russians have privately charged that Islamic extremists destroyed the Iranian communist party and discredited the left by a cunning stratagem of branding them as Savak agents. On the American side, officials express regret that our Iranian friends have been dishonored and reduced to impotence.

From the beginning of the Iranian revolution, Soviet policy has been not to do anything that might offend Khomeini's people and to establish the closest possible contacts with the new rulers of Iran. As on earlier occasions in countries such as Egypt, Syria and Iraq undergoing revolutionary upheaval, in Iran too the Russians turned a blind eye to the persecution of local communists.

According to American analysts, the Russians welcomed the hostage crisis because it rendered any U.S.-Iranian rapprochement impossible. But to the Russians it appeared that the hostage crisis increased the likelihood of a U.S.-sponsored coup which would have had international approval because of the sympathy for the hostages.

The Russians could never rid themselves of the fear that U.S. attempts to free the hostages disguised a strategic plan to reverse the loss of Iran and, conceivably, to turn Afghanistan back from its progress as a Soviet client. As one Soviet diplomat put it, "Any administration except Carter's would have known how to exploit such a golden opportunity."