After the limited nuclear deal Iran reached with the United States and other world powers in Geneva, the quintessential question is whether Tehran is ready to make a major change in its foreign policy and put aside its traditional anti-U.S. stance.



Based on its actions and words in the first week of December, Iran seems to be sending contradictory signals.



Foreign Minister Mohammad Javad Zarif took an extended tour of Persian Gulf states, with the exception of archrival Saudi Arabia. After a few years of cool ties and mistrust, it was suddenly smiles and warm words of bilateral relations, regional cooperation, and peace. Even in the case of Saudi Arabia, Zarif did not hide Iran's desire to improve ties as he tried to emphasize Iran's nonadversarial intentions.



The Gulf countries Zarif visited are all U.S. allies to varying degrees -- suggesting that Iranian foreign policy could be preparing to loosen the anti-Americanism that shaped it for the last 34 years.



The same week, however, Iran's Foreign Ministry voiced its strong opposition to a draft U.S.-Afghan security pact that is a hot topic of debate in Kabul. A ministry spokesperson underscored Iran's position that, if ratified, the deal would have a "negative impact on regional developments."



At a critical juncture, when Afghan President Hamid Karzai is refusing to sign the deal unless certain conditions are met, Iran has opted to make things more difficult for Washington.



When considering the two contradictory approaches, a new question arises -- which more accurately reveals Iran's true position vis-a-vis the United States?



The answer is neither.



It has been Iran's policy, even during the late shah's regime to have good relations with its southern, oil producing Arab Muslim states. Now that Iran is retreating somewhat from its hard-line nuclear policy, the time is opportune for rebuilding its bridges with the Persian Gulf Arab states. This policy is also closely tied to oil politics and Iran's need to increase its export quota within the Organization of the Petroleum Exporting Countries (OPEC).



According to Fereydoon Khavand, an Iranian economist living in Paris, the issue of Iran's export quota is a touchy one for the Saudis, who might have to reduce their own exports in order to accommodate Iran's desire.



Iran's Backyard



In the case of Afghanistan, Iran has always regarded this country as its backyard and it cannot accept a pact that permanently leaves American troops and bases across the border.



Hossein Alizadeh, a former Iranian diplomat who now lives in Europe and writes on Iranian foreign policy, told this author that Iran would have a similar negative reaction if Russia or China tried to build a permanent military presence in Afghanistan.



So, if Iran's diplomatic activism in the Persian Gulf and its position on Afghan-U.S. ties are not very helpful in deciphering Tehran's intentions when it comes to the United States, then what other signposts can we see?



Mr. Alizadeh believes that, actually, Tehran has not yet given a clear signal in this regard. With the exception of its willingness to negotiate a deal on its nuclear program, which can be seen as a positive step, the Islamic republic has not yet shown any readiness to normalize ties with the United States or give up its long-held anti-American positions and rhetoric.



Iran observers are united on one point: the key to such momentous and historic decisions is none other than the supreme leader, Ayatollah Ali Khamenei.



Does Khamenei want a full-fledged restoration of ties with the United States? Is he willing to change Iran's staunch anti-Israeli policies? These are the crucial policies that have defined and shaped Iran's foreign policy since the Islamic Revolution.



A number of factors influence Khamenei's thinking on U.S. and Israeli issues.



First, it is an ideological principle for Khamenei and his hard-line supporters to carry on with the uncompromising positions set out 35 years ago by Ayatollah Ruhollah Khomeini, the founder of the Islamic republic.



Khomeini unceasingly urged his followers to defy the United States and fight against Israel without fear. His famous declaration about U.S. threats was that "there's not a damn thing America can do."



This ideology has been the basis of recruitment and mobilization for phalanx after phalanx of supporters and fighters and also justification for numerous aggressive and violent policies both domestically and internationally. Too much has been invested and too strong a perception of influence has been created for Khamenei to give up.



Thin End Of The Wedge?



The second factor is the preservation of the very essence of the Islamic republic itself. Regime survival is an overriding factor. How much can Khamenei give up or change in Iranian policies without endangering the complicated survival web he and others have woven in Iran and beyond its borders?



If Khamenei makes a drastic change in relations with the United States then other things will follow: Ordinary people who yearn for openness, social freedoms, and a better economy. Reformist activists will feel empowered and emboldened to ask for more.



Gradually, more openness will bring a larger foreign -- Western -- footprint into the country. People will be less afraid of regime restrictions and will increasingly challenge the stifling rules and restrictions imposed on them in the name of religion and the struggle against the United States and Israel. Khamenei, most clerics, Revolutionary Guards, and other conservatives think about this nightmare in which the very fabric of the system unravels.



With the election of a new moderate president and a nuclear deal, the pressure is there for discarding the traditional anti-U.S. positions of the regime. The strong reaction of people in Iran welcoming the nuclear deal indicates that the majority desire a less confrontational foreign policy.



Reformist politicians, activists, thinkers, and writers have also become more vocal, demanding a change in policy toward the United States. Former President and influential leader Akbar Hashemi Rafsanjani has repeatedly hinted at the need for a conciliatory foreign policy. A year ago Rafsanjani was on the defensive, but now he and another former president, Mohammad Khatami, see their positions vindicated by the popular support Hassan Rohani received in this year's presidential elections.



Popular support for moderate leaders and moderate policies is more visible in Iran. One can say that a new and strong tide -- one demanding a break with past isolation, and better ties with the U.S. and the West -- is rising.



Now more than ever Iran is internally divided over its confrontational policies and especially in regard with its anti-U.S. ideology.



Leader Khamenei, under the pressure of sanctions, has agreed to a nuclear deal. But he is far from accepting a fundamental change in foreign policy vis-a-vis the United States and Israel. This would be too much of an ideological deviation and too dangerous for the survival of the regime.



Khamenei will tread very carefully for the foreseeable future.





The author is RFE/RL's Regional Director for Iran and Iraq. The opinions expressed in this article are his own.