Editor's note: Fawaz A. Gerges holds the Christian A. Johnson Chair in Middle Eastern Studies and International Affairs at Sarah Lawrence College. His most recent book is "The Far Enemy: Why Jihad Went Global." This is the second of two pieces by Gerges on the Iranian election.

Fawaz Gerges says Iran's elite is united on the country's foreign policy, which they view as successful.

(CNN) -- Regardless of who wins the Iranian election, continuity will be the hallmark of Iran's foreign affairs and nuclear program.

A consensus exists among the ruling elite, including reformists and conservatives, that on balance, Iranian foreign policy has been successful in maximizing the country's national interests.

Iranian officials are convinced that the current foreign policy approach has earned the Islamic republic prestige and universal recognition. Taken seriously by friend and foe alike, Iran is a key player in world politics.

Seen from Tehran, the country has achieved most of its foreign policy priorities: After three decades of animosity and active opposition, the United States has finally recognized the legitimacy of the Islamic republic and its role as a pivotal regional power, even though it doesn't formally recognize the regime.

The Obama administration has reversed its predecessor's goal of regime change in Tehran and has sought to re-engage diplomatically with the ruling mullahs. In the past three years, in particular, Iranian leaders have demonstrated their regional weight and clout in Iraq, Lebanon, Palestine, Afghanistan and Pakistan, a testament to the emergence of Iran as a leading regional player.

None of the presidential candidates challenges the basic tenets of the country's international relations, even though leading reformist and conservative contenders criticize President Mahmoud Ahmadinejad's extreme rhetoric, particularly the denial of the Holocaust, which antagonized the West and provoked international condemnation of Iran.

Don't Miss

Both reformist candidates, Hossein Mousavi and Mehdi Karroubi, have said they would pursue a foreign policy of détente with the West and would be willing to meet with President Obama if it would help advance Iran's national interests. However, neither has proposed to deviate from the broad contours set by Supreme Leader Ali Khamenei and the National Security Council.

Bush's global war on terror brought high dividends to the Islamic Republic. By overthrowing the pro-Sunni Taliban in Afghanistan, bitter enemies of Tehran's, and the Sunni-dominated Saddam Hussein regime in Iraq, a historic rival of Iran's, the Bush administration swiftly turned Iran into the unrivaled superpower in the Persian Gulf.

The U.S.-led invasion and occupation of Iraq structurally changed the balance of power in Baghdad and empowered a Shiite-led coalition friendly to Tehran. Iran has now replaced the United States as the most influential actor in Iraqi politics by virtue of its co-option of most of the leading social groups there, particularly the Shiites, who represent more than 60 percent of the population, and the Sunni Kurds, at 20 percent.

Iranian political influence has spread far beyond Iraq. Today, Iran holds the torch of "defiance" and "resistance" to the U.S.-Israeli alliance in the Middle East; it has invested considerable capital in aiding "resistance" movements in Iraq, Lebanon and Palestine like Jish al-Muhdi (Muqtada al-Sadr's militia), Hezbollah and Hamas.

Shiite-based Iran has appealed to many Sunni Arabs and Muslims over the heads of their rulers, despite a concerted campaign by pro-Western "moderate" Sunni-based Arab states to whip up anti-Shiite (anti-Iranian) sentiment amongst their population.

The United States needs Iran to ensure an orderly withdrawal of its troops from Iraq as well as a smooth political transition afterward. American officials also acknowledge that Iran's assistance would help stabilize a war-torn Afghanistan and reduce hostilities in the Arab-Israeli conflict.

As America's regional position has weakened, Iran has gained the upper hand and has effectively leveraged its influence by raising the ceiling of its demands from the Obama administration.

In my interviews with Iranian officials and their allies in the Middle East, they stress that a settlement with the United States (they hardly list other Western states) must explicitly recognize Iran's pivotal role in the Gulf and end efforts to isolate and undermine the Islamic-based government in Tehran. What they mean is that Iran must be factored in as a key player in any future settlement in Iraq, the Israeli-Palestinian conflict, Lebanon and Afghanistan.

For all these reasons, the next president will be unlikely to rethink Iranian foreign policy and strategic posture. At most, the international community should expect only minor changes in tactics and style.

After meeting with Israeli Prime Minister Benjamin Netanyahu, President Obama said Iran's obtaining a nuclear weapon would not only threaten Israel and the United States, it would be "profoundly destabilizing" to the international community. He said he would not let the proposed talks with the Islamic Republic go on forever, but the June presidential election would reveal whether there is a chance for progress by the end of the year.

If Obama thinks the election of a reformist president will bring about a shift in Iran's nuclear policy, he will be surprised to learn that there is little or no difference in the positions of leading candidates on the nuclear program. In fact, Iranians of all persuasions agree that their country should be allowed to develop nuclear technology and acquire the scientific know-how for further advancement.

Although Iran has made critical strides in its nuclear program during Ahmadinejad's term in office, the country's uranium enrichment program made its greatest advances during his more liberal predecessor's eight years in power.

It is unlikely that the next president will be willing or able to accede to the demands by the Western powers to suspend uranium enrichment. The supreme leader and the National Security Council are determined to advance the nation's nuclear program at all costs while stressing that enriching uranium is for peaceful purposes rather than developing nuclear weapons.

To avoid a confrontation and find an acceptable solution to Iran's nuclear program, Western leaders must take the security dilemma of their Iranian counterparts seriously. At the heart of Iran's drive to develop nuclear activities lies a quest for deterrence against a nuclear Israel and what they view as a menacing America.

Iranian leaders believe that possessing a nuclear deterrent will ensure the survival of their Islamic Republic by dissuading America from overthrowing their regime along the lines of Afghanistan and Iraq. America's invasion and occupation of Iraq was a wake-up call for the mullahs, who understandably felt threatened by the presence of 150,000 U.S. troops in their backyard.

Only by recognizing the legitimate fears and concerns of the Iranian leadership can a solution to the country's nuclear program be found. The challenge is to address Iran's security dilemma and provide its leaders with alternative means and assurances to going nuclear.

But that may be too little, too late because Iran already possesses the scientific know-how and is on the verge of clearing the last technological hurdles to building a nuclear weapon. Iranian scientists are racing against time to reach a nuclear breakthrough and present the world with a fait accompli.

The opinions expressed in this commentary are solely those of Fawaz Gerges.