Consider how the stage was set in late summer. The 52 American hostages were still locked up somewhere in Iran. Sensitive initiatives were under way to secure their release. Iranian militants were still threatening show trials and demanding, among their terms, American repentance for a long history of deep intervention in Iran's internal affairs.

Enter (in print) William Sullivan, career diplomat. His final, thankless post before retirement last year was that of U.S. ambassador in Tehran at the time of the decline and fall of the shah and the emergence of Ayatollah Khomeini as the impenetrable father figure of a revolution composed of many disparate parts.

Does he practice a professional's discreet restraint? No way. He charges, head down, into the lates issue of Foreign Policy magazine with a mean-minded mini-memoir. In it, he chronicles in minutes detail his and rival Carter administration strategies and master plans for intervening in the internal Iranian power struggle in the most intimate and all-pervasive way.

There is much loose talk of secret cables and telephone conversations "in the clear," of irreconcilable schemes for military coups to save the shah or to preempt the revolution. Out of it, Sullivan emerges, not surprisingly, as a diplomatic paragon, farsighted, tough-minded, unfailingly right. The villain in the piece is President Carter's national security adviser, Zbigniew Brzezinski -- uniformly impulsive, uninformed, indiscreet and wrong.

Sullivan sees what he calls the "Brzezinski factor" in almost everything. When Carter, on a deep-sea fishing trip, made the "irretrievable" mistake of canceling a mission by a U.S. official to parlay with Khomeini at a critical juncture, only Brzezinski was with him, Sullivan pointedly reports.(Brzezinski says the decision was approved by Secretary of State Vance.)

At another point, Sullivan reports that he replied unprintably to a relayed inquiry from Brzezinski about chances for a military coup. (Brzezinski says a coup was not even his first choice among three on which the embassy's opinion was being solicited by a National Security Council subcommittee of which Brzezinski happened to be chairman.)

And that, we are supposed to believe, is how we lost Iran.

All right, I've oversimplified a bit. But that is pretty much the burden of the political tract Sullivan has chosen to throw into the thick of the presidential campaign. And the irony of it is that it actually does shed quite a lot of light on how things went so terribly wrong for American interests in Iran -- though not, of course, the light that Sullivan had in mind.

At some critical points, Sullivan's blinkered, self-serving account is over-wrought or demonstrably inaccurate. But for the same reasons that Sullivan should not have started the argument, the administration's hands are tied in trying to answer it.

In any case, Sullivan's strategy of easing the shah's departure, maneuvering to hold the armed forces together and seeking accommodation with Khomeini was never really tested. Neither was the Brzezinski strategy to save the shah (or a front man for him) by manipulating the armed forces to suppress the revolution.

That's the point: no clear course of action was ever put to a fair test. There was a profound division among the president's principal advisers, and the president never did resolve it. But Sullivan has his teeth so firmly clamped on Brzezinski's ankle that he offers only fragmentary glimpses of this administration-wide collapse in crisis management.

Far more valuable evidence is available, however, in a cogent and comprehensive analysis of the administration's handling of the Iranian crisis. cIn a recent issue of Washington Quarterly, published by the Georgetown University Center for Strategic and International Studies, Michael A. Ledeen and William H. Lewis painstakingly trace the developments leading up to the departure of the shah and the triumphant return of Khomeini from exile.

The picture is of a policy-making process put pretty much on automatic, with the loudest voice (more often than not Brzezinski's) prevailing and the president's hand scarcely visible. Defense Secretary Brown "never took a strong position during the crisis." CIA Director Stansfield Turner "generally took cautious positions. . . ." Supportive messages from Brzezinski to the shah via Sullivan were simply not delivered. An important Sullivan proposal for Washington's approval was not even acknowledged.

At one point, Ledeen and Lewis do suggest, in extenuation, that perhaps the crisis managers were trying to manage the unmanageable. "The most important part of the outcome of the Iranian crisis," they write, was "the political dynamics of the country itself, and the critical role of the shah and his associates."

But their conclusion -- the one Sullivan never gets around to -- is an indictment of presidential management. With a choice between promoting gradual evolution to a "reformist government" and encouraging use of the "iron fist," the administration "did neither -- it hoped for the best, and go the worst."