Washington is ratcheting up pressure on Iran to force it to scrap its controversial nuclear program.
On Saturday, U.S. President George W. Bush asked Iran to "quit sending in sophisticated equipment that's killing our citizens."
The defiant Iranian president fought back swiftly, blaming the terrorism in Iraq on the U.S. presence.
"There was no terrorism in our region six years ago. As soon as strangers set their foot here, the terrorists came," he said on Sunday.
Ahmadinejad's visit, however, drew protests from Sunni Iraqis. Sunni political parties and a secular party led by former Prime Minister Iyyad Allawi refused to meet him.
Analysts said Ahmadinejad's two-day visit seemed to have dwarfed Bush's previous trips, which were unannounced and lasted only hours.
They said Iraq is unlikely to make a drastic policy shift in favor of Iran, though the leaders of the two countries downplayed the long-standing border dispute during Ahmadinejad's stay.
The Iraqi government would not make its policies without taking into consideration of the U.S. views, they added.
Iran and the U.S. have held three rounds of talks since May on the security issue in Iraq.
Yet, given the more than 400 billion U.S. dollars and nearly 4,000 lives Washington has invested in the Iraq war, it is not expected to allow Iran to upgrade its role.
(Xinhua News Agency March 4, 2008)