In the run-up to the Iranian parliamentary elections on 14 March, the BBC News website's world affairs correspondent Paul Reynolds reviews the country's ascent as a regional power.
President Ahmadinejad: said to be "confident and relaxed"
The visit to Iraq by President Mahmoud Ahmadinejad highlights the irony that Iran has been hugely strengthened by the removal of its old enemy Saddam Hussein at the hands of its current antagonist, the United States.
Iran is one of the winners from the US-led invasion of 2003.
Not only did the Americans get rid of Saddam Hussein, who launched an eight-year war against Iran in 1980, but the government of Iraq is now led by Iran's co-religionists, the Shias.
The two governments have their differences - the Iraqi reliance on the United States being the main one - but their friendly relations enable Iran not to worry about any threat from its once aggressive neighbour.
Iran's elections, and more particularly the presidential election next year, will determine whether the hardliners will consolidate their control for the next few years. If they do, the prospects for any settlement of the nuclear issue would be far-off.
President Ahmadinejad's visit, presumably timed with the election in mind, also says something about the confidence Iran must have that Iraq is entering a period of relative stability, five years after the invasion.
The nuclear issue
The other factor giving Iran confidence at the moment is its belief that the threat of an American military strike against its nuclear facilities has receded.
This follows the publication in December of a US National Intelligence Estimate (NIE). The NIE concluded that Iran did have a secret nuclear weapons programme but had stopped this in 2003 when it was exposed and had probably not re-started it.
"Iranians I have spoken to recently tell me they are super-confident and relaxed," said Rosemary Hollis, director of research at Chatham House in London.
"They think the nuclear issue is closed and that there is no reason to do any deal. They also think that time is on their side and that trends are moving with them.
"I was also told that Iran would be reluctant to build a nuclear weapon as that would spur Arab countries to do the same and Iran would lose any advantage it might have. Instead it could build up the technology with which to make a bomb if it chose to do so one day.
"Ahmadinejad's visit to Iraq emphasised Iran's regional influence. He gloried in it. It is a big deal for Iran that Iraq is no longer dangerous.
"Arab neighbours are watching Iran carefully and want the US to stay. They perhaps think it is preferable to have Iran and the US as counter balances than to have the hegemony of one."
The nuclear issue however does remain a cloud on Iran's horizon. So does the economy. The Security Council has imposed a third round of sanctions and these in due course will add to the economic problems Iran faces.
Economic difficulties, while alleviated by the high price of oil, probably present the greatest challenge for the Ahmadinejad government - and the greatest threat to it.
The sanctions also show that Russia and China, both of which have significant economic interests in Iran, remain onside over insisting that Iran suspend enrichment. So Iran cannot count on them to get sanctions stopped.
And not everyone is convinced by the NIE report, which means that the threat of some kind of action one day is not entirely ruled out. The Israelis are not convinced at all and are urging others not to ignore what Israel regards as the grave threat from Iran.
A senior British diplomat has also weighed in with sceptical comments about the intelligence estimate. He told reporters in London on 5 March that he was "surprised" at the report and said: "I haven't seen any intelligence that gives me even medium confidence that these programmes haven't resumed."
So Iran's position in the region, while currently strong, also has its weaknesses.