Secondary causes galore can be adduced to explain the failure of the Iranian rescue effort. But behind that intrinsically risky mission, its poor timing and pathetic consequences, there lies a single massive condition from which everything else derives. That is the sanctimonious moralism of Jimmy Carter.

Iran, from the very first, brought out the president's pietistic vanity. Carter would not sully his hands to save the shah or foster military regime. When the ayatollah came to power, the president did not acknowledge to himself or the world that there had taken place a shift bound to have catastrophic consequences. On the contrary, he deluded himself in the conceit that he and Khomeini, as men of God, could make accommodation.

The seizure of the hostages on Nov. 4 was quintessentially a political event with international overtones. The ayatollah and those around him initiated the action to save a floundering revolution by transferring blame to foreign villains. The right American reaction would have been to cast the episode in its political and strategic context.

In that spirit -- as not a few of us said at the time -- Carter would have stigmatized the seizure as an illegitimate event irrelevant to any past American behavior and unprecedented even in the malign actions of Stalin, Hitler and Attila the Hun. There would have been no discussion of grievances until the hostages were released. The United States would have reserved the right to take any kind of retaliatory action -- including military action.

Carter, instead, made the hostages a test of personality and morality. He iterated and reiterated his deep concern over their fate. He declared publicly that he would take no action to jeopardize their lives. He received half a dozen who had been released under ambiguous circumstances as if they were conquering heroes. He entered into negotiations for release of the rest. He asked the country to burn candles for them at Christmas. He refused to participate in the presidential campaign until the hostages had been released. In short, he made the 50 hostages the top American priority in the world -- the be-all and end-all of national and international politics.

Once aware of Carter's willingness to negotiate under duress, the Iranian leaders did the obvious. They made the president the plaything of their politics. They kept holding out hopes for release in return for concessions. Each time Washington gave, Tehran upped the price. Repeatedly Carter was made to look impotent. Repeatedly he felt obliged to take actions that showed strength. In the nature of things, those actions could not succeed. Thus there was the freezing of Iran's assets in this country -- a step with adverse consequencies still to come. There was the overreaction to the Soviet invasion of Afghanistan with threats of punishment that could not be delivered. There was the start, stop and start again of moves for allied sanctions against Iran that now look so foolish.

The rescue operation was conceived in the same halfhearted, second-best spirit. It was delayed for months while Jimmy Carter tried his hand with the ayatollah. Had it been carried out earlier -- in January, say -- it would have appeared a normal response to an act of international terror.

When it did come off, four months later, the cost of failure was exceedingly high. Friends and allies could believe they had been tricked and let down. Leading senators could feel misled. Secretary of State Cyrus Vance, Carter's leading collaborator in the policy of self-righteousness, found occasion to resign -- a sad event, though not, in view of Vance's role in shaping policy, worthy of much besides sympathy.

Second-guessing the operation itself yields little. Perhaps it was whittled down by an excess of humanitarian concern to the point where a lack of helicopters made failure inevitable. But such operations -- as Tolstoy tells us in a couple of thousand pages of "War and Peace" -- are by their very nature messy. Still, if critics are in poor position to attack the failure of phase one, the administration can hardly argue that phase two, which never came off, was sure to be successful.

For my own part, I believe the possible gains fully justified the risks. Had the hostages been released, Carter would have been hailed as a great hero.

But wrongly so. For the true problem goes back to the basic decision that made the rescue operation a plausible bet. That was the decision to bring the hostages front and center as the ultimate prize of world and national politics. That choice flowed from deep-seated personal characteristics that make Carter unfit to be president at a time of crisis.