The Carter administration has embarked on all-out effort to win release of the American hostages in Iran. While nobody can favor their indefinite captivity, the present scheme bears all the marks of a mad electoral maneuver. It would solidify Russia's position, and cause the United States, as ransom for the hostages, to weaken its standing in both the Mideast and the Persian Gulf.

The projected deal with the Iranians would include lifting economic sanctions, unfreezing assets and supplying munitions for the war against Iraq. sIn effect, the United States would legitimize the regime in Iran.

But the Iranian regime is a main force for destabilization in the world today. It is dominated by a band of religious fanatics bent on pushing their brand of Shiite Islam throughout the Moslem world.

To that end they have engaged the support of most of the wildest cards in the international deck. A notable example is the Shiite leadership in Syria. The Syrian leaders have just signed a security treaty with Russia and affiliated themselves with Libya, while also serving as the main patron of the Palestine Liberation Organization.

The Shiite offensive threatens all the Arab countries headed by leaders of the rival sect -- the Sunni Moslems. Especially Iraq, where a Sunni leader, Saddam Hussein, rules over a Shiite majority. Saddam Hussein has moved to bolster his position by alliances with Sunni Moslem leaders in the rest of the Arab world. He has particularly cultivated the monarchs ruling the states of the Arabian Peninsula -- notably Saudi Arabia, Jordan, Kuwait and the United Arab Emirates.

Thus the Iraqis have gone into partnership with the Saudis in pushing for moderate oil price increases. They have been the main givers of aid to King Hussein of Jordan. Most important of all, they have staked a claim to replace Iran as the dominant force in the Persian -- or, as they call it, the Arab -- Gulf. It was to assert the preeminence of the Sunni Arabs in the Gulf that Iraq launched the war against Iran.

The Iraqis would also thicken the anti-American content of their drive to influence the Arab states of the Gulf. They would move to sever American connections with Jordan and Saudi Arabia and the other oil-rich countries of the Gulf. Those countries, having seen the United States switch from a neutral posture to alliance with their rivals in Iran, would be all the more prone to rally to the Iraqis.

The American response to that squeeze would be the response the Carter administration has always made. Carter would try to curry favor with the Arab oil countries by pushing for a Palestinian homeland, and Arab rights in Jerusalem. The Israelis would then put up their backs, thus jeopardizing anew the peace talks with Egypt.

But the Egyptian-Israeli peace treaty is the one thing the United States has going for it in the Mideast. The war in the Gulf has not spread precisely because the only two countries in the area with a real capacity to fight -- Egypt and Israel -- are in the process of negotiating peace. The peace treaty, in other words, is the stopper for the whole area -- the one factor now limiting conflict.

The United States, in these conditions, ought to be very careful about pushing for quick release of the hostages. If such an effort were rebuffed, this country would once more be humiliated in an area that sets store by the appearance of strength.

If successful, the deal the president contemplates would undermine cherished American interests. The hold of the hostile Iranian regime on the northeast coast of the Gulf is confirmed. The American position with the countries on the southwest shore of the Gulf is diminished. The Israeli-Egyptian peace treaty, the only good American card in the area, is devalued. And the Russians, already entrenched in Afghanistan, Pakistan, Iran and Syria, improve thier standing in Iraq.

That the president is willing to pay such a ransom shows that the hostages have become the centerpiece of his whole foreign policy. He has an "obsession," not with them as he once said, but with his reelection. Which is one reason that so many of us find it so hard to support him, even against Ronald Reagan.