THE IRANIAN REVOLUTION has now saved the United States from a dangerous fit of indecision, from which it was unable to save itself. This country had been supplying Iran with a steadily increasing flow of the most advanced and powerful weapons. Successive administrations saw the risks in those sales but, once having begun them, no one in Washington could find a way to turn them off. Now the new Iranian government has taken matters into its own hands. After canceling most of its arms orders in February, it called off the rest this week. Whatever the economic costs and penalties, Iran's revolutionary government has done this country a very good turn.

The United States was selling the Iranians the latest of its fighter aircraft, armed with extremely sophisticated missiles. It was selling military electronics, destroyers, submarines-anything at all, short of nuclear weapons. The orginal idea was to provide the Iranians with enough modern armaments to increase the stability of the Persian Gulf region. But a few months after President Nixon made the offer, the price of oil shot upward and the shah suddenly had the money to buy almost anything he pleased. Ironically, his inordinate outlays for arms were one cause of the revolution that has now brought the region into greater instability than ever.

There were many unpleasant implications in the tremendous accumulations of these weapons in Iran. As the deliveries accelerated, it got harder to see just what the shah proposed to use them for-and against whom. Iran received the help of large numbers of American technicians and advisers to keep this equipment in operation. That raised the haunting possibility that the shah might fling his forces recklessly into war, forcing on the United States the choice of either supporting him totally with the advisers or destroying him by withdrawing them.

That possibility has now vanished. All of the American technicians are out of Iran, and all deliveries have stopped. Some shipments of spare parts may be started again in the future, but no more planes are to be sent over. There is even talk that the Iranians may ask the United States to buy back the F14 fighters. It's true that some canceled orders will be placed with other Middle Eastern countries. By abrogating its purchase of the very advanced F16 fighters, Iran will have speeded up delivery to the next customer in line-which is Israel. But sales to countries like Israel and Egypt can be expected to contribute to keeping the peace. That argument was getting very difficult to make in behalf of the shah, with his swelling and unfocused ambitions.

The lesson of the episode is that an ill-considered program of arms sales can get out of control very quickly. The United States has now been rescued from a dangerous commitment, but only by a revolution that-like everything else in this story-it failed to foresee. It wasn't wise diplomacy that resolved the dilemma of the shah's American armaments, and it wasn't strong leadership. It was mere good luck.