Baghdad and Tehran pledged on Wednesday to strengthen ties and put the past behind them, even as Washington accuses Iran of supplying new and more lethal weapons to anti-US militias.
Iran and Iraq, which fought a 1980-1988 war that was one of the bloodiest conflicts of the past century, killing an estimated one million people, have drawn closer since the US-led invasion of 2003.
But US officials have expressed concern at the Islamic republic's growing influence in Iraq, which is strategically important to both Tehran and Washington.
"I would like to announce to all Iraqi people that we have forgotten all the pain of the past," Iran's First Vice President Mohammad Reza Rahimi told Iraqi Prime Minister Nuri al-Maliki at a ceremony to sign several agreements to boost cooperation in culture, technology, science, communication, health and tariffs.
"All of what Iranians love exists in Iraq," Rahimi said, referring to the most revered shrines of Shiite Islam in the Iraqi cities of Najaf and Karbala, where Iranian pilgrims throng, braving the bombings which rock Iraq each day.
"We are ready to stand beside Iraq and build this country, to provide security," Rahimi said.
Maliki owes his premiership in large part to Tehran. It was Shiite Iran that pressured its powerful Shiite proxies to throw their weight behind Maliki, after an inconclusive March 2010 election which he lost by a single vote.
Staying on for a second term, Maliki formed a unity government in December, after a powerful Shiite alliance announced its backing.
"We would like to thank the Iranian side for this initiative and this visit, which confirms the desire of both Iraq and Iran to improve relations," the premier told his guest.
Maliki said that relations between the two Muslim neighbours should be improved even more, inviting all Iranian companies and businessmen to Iraq with open arms.
"We invite all Iranian companies who want to invest to come," said the prime minister. "The invitation is open for all businessmen in the private sector."
Last week, Iraq signed a $365-million (252-million-euro) contract for Iran to build a pipeline to supply natural gas to power stations in Baghdad.
Signup to our newsletter and follow us on Facebook and Twitter!
Meanwhile, Iraq's parliament speaker Osama al-Nujaifi stressed the need for good relations with Iran, but "on the basis of mutual respect and non-interference in internal affairs."
He also called for a halt to Iranian "shelling of villages and land" in the autonomous Kurdish region of northern Iraq.
Iran's forces regularly shell the border regions of Iraqi Kurdistan, home to members of the separatist Iranian-Kurdish rebel group PJAK, or the Party of Free Life of Kurdistan.
In his comments in Baghdad, Rahimi noted that the room where they were standing -- inside the Republican Palace of ousted dictator Saddam Hussein and his Sunni-dominated regime -- was where the battles against Iran were planned during the war.
Last weekend, the US ambassador in Baghdad, James Jeffrey, told reporters that Iraq was tremendously important to the United States and the world, because its growing oil and gas production were critical to meet rising global demand.
But he also added that his top concern for the future stability of Shiite-majority Iraq was over insurgent Shiite groups that were beholden to Iran.
"Iran has been supplying some of these militias with significantly more lethal weapons systems, and they have been carrying out more attacks on us," Jeffrey said.
"Not getting some of these militias under control can undercut rule of law and governance in those areas where they are allowed to roll around free," Jeffrey said.
He said two of the groups, Ketaeb Hezbollah and Asaib Ahel al-Haq, "are nothing more than thuggish clones" of the Qods Force, a wing of Iran's Revolutionary Guards.
Last month, Major General Jeffrey Buchanan, the US military spokesman in Iraq, told AFP that the two groups, plus the Promised Day Brigade, were responsible for attacks against US forces, which last month suffered their worst casualties in three years with 14 soldiers killed, most in rocket attacks.
Ketaeb Hezbollah has said it was behind the deadliest single attack last month against US forces -- a June 6 rocket strike on a military base in Baghdad that killed six American soldiers.
Tehran has denied repeated US accusations of smuggling arms into Iraq and Afghanistan.