By Jim Muir
BBC News, Tehran
If anybody had hoped that Barack Obama's election victory would lead to a swift breakthrough in Washington's relations with one of its toughest adversaries, Iran, the honeymoon seems to be over before it even began.
Mr Obama said he would not react "knee-jerk" to Iranian congratulations
Many Iranians, including some officials, were thrilled by the stunning election victory, seeing it as offering hope of a radical change in US foreign policy and relations.
The two countries have had no diplomatic relations since shortly after the Islamic revolution in 1979, and tensions have risen recently over Iran's nuclear programme.
Both Mr Obama and his future vice-president, Senator Joseph Biden, have in the past advocated unconditional dialogue with Iran.
That was one reason behind the excitement generated in Iran by their election success.
No 'knee-jerk' response
That excitement led the country's quixotic president, Mahmoud Ahmadinejad, to break with precedent and send a congratulatory message to the American president-elect.
But it swiftly became apparent that a whirlwind romance was out of the question, as political problems sprang up on both sides.
In Iran, both Mr Ahmadinejad's initiative and Mr Obama's cagey response drew fierce attacks from rival hard-line circles, where the political atmosphere is already heating up sharply in advance of Iranian presidential elections next June.
On the American side, while Barack Obama responded gracefully and personally to messages of congratulation from other world leaders, he held back from doing so with Mr Ahmadinejad, mindful of the political implications of such a gesture.
He said he would be reviewing the Iranian president's letter and responding appropriately, rather than reacting in a "knee-jerk fashion".
But Mr Obama made it clear that he will not be a soft touch when it comes to Tehran.
"Iran's development of a nuclear weapon I believe is unacceptable. We have to mount an international effort to prevent that from happening," he said.
"Iran's support of terrorist organisations, I think, is something that has to cease."
The Speaker of the Iranian parliament, Ali Larijani - who has been sharply at odds with President Ahmadinejad over parliament's impeachment last week of the latter's interior minister - described Mr Obama's comments as a step in the wrong direction.
"It signals a continuation of the erroneous policies of the past," he said. "Change has to be strategic, not just cosmetic."
Hard-line Iranian newspapers on Sunday took up the theme of continuing American hostility to Iran and a common policy shared by Republicans and Democrats alike.
Some also pointed out that one of Mr Obama's first actions was to appoint as his chief of staff Rahm Emanuel, whose background reportedly includes volunteer service in the Israeli army.
Some also criticised Mr Ahmadinejad directly for stretching out his hand to the American president-elect.
The right-wing daily Jumhouri Islami said his initiative was wrong on several counts.
If it was a prelude to reopening a dialogue with Washington, it said, such issues were of a magnitude which only Iran's Supreme Leader, Ayatollah Ali Khamenei, was qualified to address.
President Ahmadinejad sent Mr Obama a congratulatory letter
Ironically, the main voices raised in support of Mr Ahmadinejad's overture came from the reformist camp, which favours dialogue with Washington and which is normally at loggerheads with the president.
The issue of opening a direct dialogue between Washington and Tehran is clearly a political minefield for both sides.
But that does not necessarily mean it will not happen.
As he pointed out in his remarks about President Ahmadinejad's letter, Mr Obama's hands are in any case tied until he takes office in January.
The economic and financial crisis will then be his obvious first priority.
But he has already singled out Iran and its pursuit of nuclear technology as a compelling foreign policy issue to be addressed, and he has not so far drawn back from the idea of direct talks, an approach long championed by Senator Biden.
Back in Tehran, much will depend on the position taken by Ayatollah Khamenei.
His addresses are often very tough on the United States.
But some Iranian officials say that he is not against a direct dialogue, if it is without preconditions and Iran's dignity is respected.
There is even some speculation about who might be qualified and authorised to conduct talks from the Iranian side.
The US remains unpopular with many Iranians
Only if a dialogue had the clear support of the Leader - who cannot be criticised - would it be likely to resist being torn to shreds in the shark-pool of Iranian factional politics.
If direct talks did get under way, it would clearly not be plain sailing.
Iranian officials and leaders remain adamant about what they see as their absolute right to pursue nuclear fuel enrichment, which they insist is only for peaceful power-generation purposes.
The Americans - apparently including Mr Obama - and others are convinced that Tehran is actually seeking to develop nuclear arms, and insist it must stop enrichment operations in exchange for imports of ready-enriched nuclear fuel and other inducements.
Some reformist leaders have suggested that the ascendant hard-liners don't really want normalisation with the US, on the grounds that continuing tension allows them to focus on external threats and silence their domestic critics.