Updated

Iran (search), a country that has bedeviled the United States for decades, could prove to be the biggest foreign policy challenge facing whoever is the next president. The messy Iraq war and a spy scandal linking Pentagon and Israeli officials could complicate U.S. hopes of halting Iran's nuclear ambitions.

Both President Bush (search) and Democratic nominee John Kerry (search) say they want to use diplomacy — although with different approaches — to prevent what could be a nightmare scenario for the United States: a nuclear-armed, hostile Islamic state in the volatile Middle East.

But the United States' ability to sound an international alarm on Iran has been damaged after much of its intelligence on Saddam Hussein's (search) weapons programs proved to be wrong. And its credibility could be further hurt by suspicions that a Pentagon official passed secrets about Iran to Israel.

Neither Bush nor Kerry advocates a pre-emptive strike on Iran. "The military option is always the last option for a president, not the first," Bush said in an interview broadcast Tuesday on NBC's "Today" show.

Yet Iran, by many standards, poses a greater threat to the United States than Saddam ever did.

As they did with Iraq, U.S. officials suspect Iran has chemical and biological weapons. But Iran's nuclear program is much more advanced than Saddam's program was believed to be. U.S. officials say Iran could produce weapons-grade uranium within a year and a nuclear weapon three years after that.

Iran says its nuclear program is for making electricity, not weapons.

The United States has long considered Iran the world's most active state sponsor of terror. Iran has supported militant Palestinian groups and U.S. officials say it has provided safe-haven for Al Qaeda members.

And even though Iran is more democratic than other nations in the region, the United States continues to condemn its human rights record.

In 2001, Bush called Iran part of an "axis of evil," along with Iraq and North Korea. Yet his administration has been divided on how to deal with it. Some, mostly in the Pentagon, favor a tougher approach. Others, mostly in the State Department, believe some accommodation is possible with Iranian moderates.

Tehran has offered some signs of seeking better relations with the United States, providing some cooperation on narcotics policy and in the war in Afghanistan. A State Department paper says relations with Iran "are frequently confused and contradictory due to Iran's oscillation between pragmatic and ideological concerns."

In a speech Monday, Democratic vice presidential candidate John Edwards said the Bush administration "has stood on the sidelines" while both Iran and North Korea "advanced their nuclear programs."

Kerry holds out some hope that a negotiated solution with Iran is possible. He said the United States and other nations should "call their bluff" by offering nuclear fuel for peaceful purposes, then taking back the spent fuel so it can't be used for weapons.

If that process fails, the United States could try to ensure that the International Atomic Energy Agency (search) takes the issue to the U.N. Security Council, where Iran could face sanctions.

Bush administration officials have suggested that it is too late for incentives. National security adviser Condoleezza Rice said recently that Iran "has to be isolated in its bad behavior, not engaged."

The administration is expected to request Security Council action if the IAEA condemns Iran at a meeting Sept. 13.

Yet prospects for action at the U.N. are uncertain. Russia, which is building Iran's nuclear reactor, has a veto. Other council members also have trade relationships with Iran.

Bush has demanded that Iran give up its nuclear program, but it's unclear what he would do if Iran refuses and the United Nations doesn't act.

Winning either domestic or international support for military action against Iran would be difficult.

Invading Iran has never seemed a credible option, said Robert Malley, an adviser to President Clinton on Middle East issues. "I think it has become far less so after what has happened in Iraq," he said.

Yet Raymond Tanter of the Washington Institute for Near East Policy, said he believes the next president will have little choice but to support the main Iranian opposition group, the MEK.

That group, however, is on the State Department's list of terrorist organizations and few politicians openly support it.

And Tanter says support for either military action or for using the MEK could be undermined by the investigation into whether Larry Franklin, a Middle East analyst at the Pentagon, provided classified information on Iran to Israel.

"Those people who would say unleash the MEK could be accused now of following a Zionist agenda," Tanter said. "The Franklin flap is quite damaging. It plays into Iran's hand."