Ronald Reagan promised that he would never treat American allies the way Jimmy Carter treated the shah of Iran, and Reagan has kept his word. He cuts friendly dictators loose far more quickly and firmly than Carter did with the shah or with Nicaragua's Anastasio Somoza.

That is not what the Marcoses, Duvaliers and Mobutus of the world would have thought Reagan meant by his campaign promise. But that is what they have learned in the past month.

Confronted with challenges to Ferdinand Marcos and to Jean-Claude Duvalier by their armed forces and civilian populations, Reagan and his advisers chose to save the two armies and to keep them unified behind new ruling elites presumably friendly to American interests.

Clinging to the repudiated Marcos or Duvalier a second longer would have meant bloody assaults on civilians that would have looked horrible on American television screens. Reagan, who carefully watches public opinion polls about the popularity of his foreign policies, may not have wanted to pay that price.

In the Philippines, the split within the military strongly suggested to Reagan's advisers that the army would disintegrate if fighting erupted in the streets, just as the violence in Tehran in the autumn of 1978 split the army, doomed the shah and created the giant vacuum that Ayatollah Khomeini & Co. filled. The attacks on civilian crowds were unleashed by an Iranian military government that the Carter White House had urged the shah to form.

Reagan had no choice but to push Marcos from his presidential palace so that the Philippine army could be saved and reorganized to fight the Marxist insurgency that increasingly worries American policy makers. The lesson of the hesitations in Iran and in Nicaragua that allowed radicals to eliminate moderate alternatives appear to have been absorbed.

In Haiti, Reagan deposed a regime that was sending tens of thousands of desperate and starving Haitians into boats and ultimately onto American beaches. Sending Baby Doc into exile and misleading Francois Mitterrand about how long the United States expected Duvalier to stay in France was a small price to pay for any chance to reduce the flood of refugees from Haiti to the United States.

In both cases, Reagan wanted it to be known that he played a rather passive role, following the advice of the regional specialists at the State Department and Pentagon. This time those specialists were not opposed by a Henry Kissinger or Zbigniew Brzezinski at the White House, emphasizing to his president the global dangers of appearing to abandon allies and giving in to a Third World uprising.

Instead, a self-confident Reagan was listening to the specialists and presumably to domestic political advisers reminding him that Marcos had destroyed all of his support in the United States by letting his goons steal the election in front of American television cameras.

The absence of a strong-willed national security adviser following his own ambitions and protecting his own reputation contributed significantly to the outcome -- although probably not as much as the presence of Ronald Reagan's continuing phenomenal good luck.