The Bush administration's announcement that it had Iranian assurances that Iraqi planes flown to Iran would be kept there is an acknowledgment that the United States has undertaken contacts with Tehran to ensure it remains neutral in the Persian Gulf War, U.S. officials and diplomatic sources said yesterday.

The sources said the contacts, conducted through third parties, have been aimed at penetrating the maze of contradictory statements and actions engaged in by Iran's revolutionary government to determine whether its fundamentalist Moslem attitudes might cause it to oppose the U.S.-led military coalition fighting to end Iraq's occupation of Kuwait.

The evidence, according to the sources, is not clear-cut. But, they added, U.S. officials have concluded that while Iran's animosity toward the United States remains, it has stuck closely to its public insistence that the invasion of Kuwait was "an obscene and unacceptable act" that it cannot help in any way.

Iran has allowed some food shipments to cross into Iraq, the sources said. But, they continued, U.S. officials are generally satisfied that the aid has been minimal and was largely a reflection of the continuing struggle between those Iranian leaders, such as President Ali Akbar Hashemi Rafsanjani, who want to reduce the country's isolation from the West and radical clerics who believe Iran should avoid contact with the non-Islamic world.

"Iran sees its two great enemies -- the United States and Iraq -- at war, and its natural instinct is to see how it can obtain the maximum possible advantage for itself without being drawn into the conflict," said one U.S. official, who asked not to be identified. "Rafsanjani's faction appears to feel that it can gain the most by not defying the world opinion arrayed against Iraq, and the United States is anxious to ensure that it keeps to that position."

Precisely what the United States has been telling Tehran and hearing in return is a closely held secret at the State Department, sources said. Only Secretary of State James A. Baker III and a few of his closest aides know the contents. The sources added that they are not even sure whether Algeria and Switzerland -- the two countries that in the past have been the main intermediaries between Washington and Tehran -- are still being used as the principal channel of communication.

However, the sources said, Baker appears satisfied with the assurances he has received about Iran's neutrality and its intentions to keep the Iraqi planes from returning to the conflict. This belief in Iran's assurances is echoed at the United Nations, where representatives of Security Council members said they have seen no credible evidence that Iran has violated sanctions against Iraq.

To reach that conclusion, American and U.N. diplomats have had to thread their way through the zigzagging course Tehran has followed since the Aug. 2 invasion, which it denounced. It then announced it would honor the sanctions voted by the Security Council shortly afterward.

However, it also was equally harsh in condemning the huge buildup of U.S. and European military forces in the gulf, saying it was willing to fight to defend Islam from the presence of "imperialists" near Moslem holy places in the region.

Fears of an Iranian tilt toward Iraq became especially strong after Iran, which had fought a bitter and costly war against Iraq through most of the 1980s, accepted overtures from Saddam Hussein. The Iraqi president returned more than 1,000 Iranian prisoners of war and withdrew from 1,000 square miles of Iranian territory that Iraq had occupied after the 1988 cease-fire between the two adversaries.

But the best that Saddam was able to get from Tehran apparently was an agreement between Iran and Turkey, Iraq's other major neighbor, that neither would move against Iraq in the event of war. A steady stream of anti-American rhetoric has continued to come out of Tehran, but it has not been followed by any action hostile to the anti-Iraq coalition.

As a result, the sources said, U.S. officials appear convinced that Iran wants to stay out of the war and that any aid or sympathy it might extend to Iraq is designed either to protect Rafsanjani's anti-American credentials among the hard-liners or to help Saddam enough to prolong the crisis without stengthening his hand appreciably.