By Frances Harrison
BBC News, Tehran
Iran's President Mahmoud Ahmadinejad has said if the United States wants talks with Tehran, it has to change its attitude first.
Iran says it has previously offered the US help with Iraq
"They shouldn't interfere in the internal affairs of other countries," he said in a news conference only for local journalists.
Mr Ahmadinejad said Iran had other conditions for talks with the US - the least of which is that Tehran will stand by its rights - by which he meant nuclear rights.
US President George Bush has said Iran should suspend nuclear work before talks; the UK prime minister, Tony Blair, has warned that Iran will face further isolation if it does not stop sponsoring terrorism.
From the Iranian point of view, this is not the language to use to ask for a favour.
Tehran feels if the West wants its help in sorting out the mess it has made in Iraq, it should at least be asked nicely - not with threats and preconditions.
Iran also points out that it offered to help in March 2006 when a senior Iraqi Shia ayatollah asked Tehran to start direct talks with America on Iraq.
Initially, Tehran welcomed the idea, but then pulled out when it became clear that Washington was not keen.
There is deep scepticism in Tehran about whether the United States really wants talks when it still uses hostile language against Iran.
Leaving aside the nuclear issue
There is also the problem of delinking any talks on Iraq from the nuclear issue.
When the prospect of direct talks was first raised in March, Iranian officials said they hoped this was a first step to discussing all bilateral problems, including the nuclear dispute.
Washington is the main force behind moves to impose tough UN sanctions on Iran over its failure to suspend nuclear work.
It is hard to see how the two countries, who have had no diplomatic relations for nearly three decades, could make progress on Iraq while Washington is trying its best to punish Iran for its determination to press ahead with its nuclear programme.
One academic here likened Iraq to a troublesome child that will eventually force his divorced parents - America and Iran - to reconcile.
It is widely recognised that Tehran does not benefit from an increasingly unstable Iraq.
As a revolutionary Shia state, Iran does not want to see Iraqi Shia killed in violence across the border.
And it fears being sucked into any worsening sectarian conflict.
There are powerful incentives for Iran to help America on the issue of Iraq, but there is also a legacy of mistrust that is hard to overcome.