THE visit of Mahmoud Ahmadinejad, Iran's president, to Baghdad will not have pleased Washington. But the invitation came from Iraq's president, Jalai Talabani, and since the US is always asking Iraq's politicians to take more responsibility for their future, it would have been pointless, and even counterproductive, to make any public complaint. There will have been plenty for the two presidents to discuss. Relations between their countries were cut in 1980, shortly after the Iranian revolution, and remained frozen during and after their awful eight-year war that followed. Ironically, it was the US invasion and deposition of Saddam Hussein in 2003 that brought them together again. The United States has been suspicious of Iran's role during its occupation of Iraq; accusations have been made, but not proved, about the supply of sophisticated weapons to Iraqi militias. At the same time there has been a natural affinity between those in the current Iraqi leadership who spent many of the Saddam years in exile in Iran. Mr Ahmadinejad's visit to Baghdad followed one to Saudi Arabia. His travels may be intended to help his image before elections in Iran on March 14th but they also reflect the reality that Iran is a major power in the region and that , despite problems over its nuclear ambitions, its influence could be helpful in Iraq during a prolonged period of rehabilitation before America's job there is done.