BAGHDAD — Iran has been here before, called upon by arch-foe America to assist in a neighborhood security problem. After 9/11, Iran helped the US extensively in Afghanistan to overthrow the Taliban and establish a new government.
It anticipated better relations in exchange for its assistance. But it was soon dubbed a member of the "Axis of Evil" by President Bush in his 2002 State of the Union address.
The outcome of that flicker of cooperation may increase Iran's wariness if it yet again receives a request from the US for help, this time in Iraq.
"This led the Iranians to conclude the US was intent on overthrowing their regime, and would not be affected by cooperative behavior," says Barnett Rubin, of New York University.
Bringing Iran – and Syria – into a regional process to stabilize Iraq is being touted both by British Prime Minister Tony Blair and the Iraq Study Group, the US commission studying options that both Republicans and Democrats hope will provide a framework for facesaving change in Iraq.
But the calculus has changed since the 2003 Iraq invasion. As the US has become more mired in the war, Iran has gained confidence that it was unlikely to face US-engineered "regime change." Iran still has numerous reasons to engage, but the price-tag may be higher.
"We're going into this with a handicap of having weakened ourselves over the past three years, and trying to negotiate over Iraq at a time when Iraq itself is in the worst situation it could be," says Vali Nasr, a professor of national security at the Naval Postgraduate School in Monterey, Calif.
"You are dealing with an Iran that is much more defiant, and much more over-confident," he adds. "Therefore Iranians may not be looking to build relations with the US ... but see it as an opportunity to pull US-Iran relations back from the brink."
The soft-spoken and reform-minded president Iran had in 2001 has also been replaced by arch-conservative Mahmoud Ahmadinejad, who has spoken vociferously at every opportunity to reinvigorate the ideals of the 1979 Islamic revolution, a key pillar of which was the slogan: "Death to the Great Satan."
"It is obviously in the national interest of Iran to have a stable Iraq," says Mr. Rubin, who advised UN negotiating teams on Afghanistan in 2001. "The question is whether the Bush administration is willing to overcome its ideological depiction of Iran as part of the axis of evil...[and] Ahmadinejad is willing to be pragmatic...despite his ideological commitments."
Mr. Ahmadinejad said Tuesday that Iran's position remained that it would speak to the US, but only if American officials change their "attitude" toward the Islamic Republic, and "correct[s] their behavior." He said he was preparing a message to Americans.
Foreign Minister Manoucher Mottaki also offered little hint at Iran's response Tuesday, saying it would consider any offer. The day before, officials gloated over the Republican defeat, saying they hoped it would yield a "180 degree" policy change.
But beneath the heated rhetoric, Iran and the US have both sent signals for months that they are ready to engage in some way.
Even Iran's supreme religious leader, Ayatollah Ali Khamenei, approved talks about Iraq earlier this year that Washington had authorized the US ambassador in Baghdad to conduct.
Iran wants all issues on the table, from its controversial nuclear program and resumption of US-Iran ties, to Iranian support for Hizbullah in Lebanon and Palestinian militants.
The US, so far, has demanded strict limits on topics. It has also insisted that Iran suspend nuclear enrichment activities before any talks can begin.
But such a hard line was taken before Democratic victories in Congress, and the replacement of Defense chief Donald Rumsfeld with Robert Gates, who has made clear in the past his desire to see US-Iran engagement. And before Hizbullah, with Iranian help and blessings, delivered what Tehran and Beirut declared a "victory" against Israel in fighting during July and August.
"You can say there is a cautious optimism [in Tehran] that something is going to happen," says Nasser Hadian-Jazy, a political scientist at Tehran University. That hopefulness prevails even though the 2001 Afghanistan example makes Iran "far more careful about what they give and what they want."
"It should not be a cosmetic relationship, addressing issues in a superficial way, by the US telling Iran: 'You do this; you do that"; that's not going to work," says Professor Hadian-Jazy. "This takes real strategic thinking on both sides."
That means coping with inevitable clashes: Israel is concerned that Washington is giving Iran too much of the regional pie, and local Sunni nations are likely to complain that Shiite Iran's influence will rise further.
But Iran also has much to offer, if it plays a role similar to the one it played in Afghanistan. US officials routinely complain that Iran is destabilizing Iraq. Iranians say Iran has decided not to – so far.
"[Iran] has already built a very important infrastructure in Iraq – military, security – but they have not yet used these resources," says Hadian-Jazy. "It is rather a guarantee against possible US military action. They want US decision-makers to think twice before taking action."
Those dangers have long been understood in Washington and London. Prime Minister Blair talked with the Iraq Study Group Tuesday by video-link. In a speech Monday night – in which he berated Iran for putting "obstacles in the path to peace, paint us ... as the aggressors" – he said that Iran should be part of the solution.
"A major part of the answer to Iraq lies not in Iraq itself but outside it, in the whole of the region where the same forces are at work, where the roots of this global terrorism are to be found, where the extremism flourishes," Mr. Blair said. Iran had to play a positive role, and suspend its nuclear enrichment program, he said, or "face the consequences of not doing so – isolation."
But such isolation would cause perhaps greater consequences for Mr. Bush and Blair, because of the influential role Iran could potentially play with Iraq's majority Shiite population.
"Iran has enough levers, money, weapons, political and cultural influence," says Nasr. "And if there is a political formula on the table.... There is a certain degree of trust, to get [Iraqi Shiites] to accept political compromises with Sunnis they would not before."
A similar dynamic was often at play during Arab-Israeli "talks" for decades, says Nasr, when "you always needed a regional power to handhold the partner."
That could be Iran's most important step, he says, though it could also stop funding radical parties and weapons traffic.
But those decisions may depend upon the US, and what security guarantees, if any – a longstanding Iranian demand – it is willing to offer as it calls for Iran to help.
"Iran will be more willing to cooperate, if there is a minimal understanding [on security]," says Nasr, a point that applies not just to Iran.
"All countries around Iraq are hedging their bets. They're not sure what will happen, the type of government, if the US will stay or go, [so] everybody has a maximalist position," he adds. "By limiting uncertainty, the US can bring some stability."