TEHRAN, Iran (CNN) -- Iran's president -- hosting a visit from Iraq's prime minister and expressing support for his country's beleaguered war-torn neighbor -- says the Islamic republic supports a "united" Iraq and will help the nation "establish full security," an Iranian news agency reported.
Mahmoud Ahmadinejad spoke at a news conference with Prime Minister Nuri al-Maliki after private talks were held on Tuesday, the state-run Islamic Republic News Agency reported. It is al-Maliki's first visit to Iran since he became prime minister earlier this year.
"Iran will provide assistance to the Iraqi government to establish full security. We believe strengthening the Iraqi government is tantamount to promoting security, peace and friendship in that country," Ahmadinejad was quoted as saying.
Iraq is currently in the throes of deep civil strife, enduring a persistent insurgency and an upsurge of sectarian violence this year between Sunnis and Shiites in Baghdad and other cities.
American and British officials have claimed that Iran is attempting to fan the flames of insecurity in Iraq, where the government is trying to promote national unity among Sunnis, Shiites, and Kurds.
Iran and Iraq are linked in large part by common religion, but their relationship is complicated.
Iran -- populated largely by Persians, Azeris and Kurds -- is predominantly Shiite Muslim. About 60 percent of the people in Iraq are Shiite, most of whom Arabs.
Iraq's new government is dominated by a Shiite-led coalition. Both Ahmadinejad and al-Maliki are Shiites.
While many Iranians and Iraqis -- officials as well as citizens -- believe the nations are kindred spirits, there have been tensions between them.
They fought a bloody war in the 1980s when Saddam Hussein was in power in Iraq. Hussein is now on trial for genocide in connection with a military campaign in Iraq's Kurdish region at the tail end of that war.
The United States, now the chief ally and backer of the Iraqi government, has been a longtime adversary of Iran on many issues, including Iran's nuclear ambitions.
Last week, six Iraqi border guards were detained by Iranian border guards in a dispute, an official with Iraq's border security said.
A prominent Sunni member of Iraq's parliament, Saleh al-Mutlag, questioned al-Maliki's visit in light of this incident.
"I am very surprised that a prime minister would visit a country holding symbols of Iraq's sovereignty," he said.
An Iraqi official told CNN the issue will be dealt with in Tehran by lower-level officials from the two countries.
Ahmadinejad also boosted the idea of a "united and independent Iraq" that "will be beneficial to security and progress of the entire region."
He "pointed out that both countries have close ties in both cultural and religious areas, and they have reached agreement in trade, transportation and energy," IRNA said.
"The Islamic Republic of Iran and Iraq enjoy deep-rooted historical relations beyond normal ties between the two neighboring states," Ahmadinejad is quoted as saying. "We regard progress, independence and territorial territory of Iraq as our own."
And, he added, "we completely support the Iraqi government and parliament and will transfer our experience to our Iraqi friends in all fields including reconstruction of the country and economic cooperation."
Describing his talks with al-Maliki as "very good," he said the countries "share" a "common stance on regional and international issues. Both sides are determined to consolidate brotherly ties."
According to the IRNA report, al-Maliki said both countries are looking forward to bilateral cooperation.
IRNA reported that al-Maliki was "asked whether Iran and Iraq did not implement previous agreements following allegations raised against Iran about its meddling in Iraq's domestic affairs."
It reported that al-Maliki "stressed the two sides face no obstacle in the way of implementing agreements."
Earlier, Iraqi government spokesman Ali Dabbagh told CNN that al-Maliki was in Iran on a two-day official visit "to discuss security and political relations."
"In principle, Iraq wants a relationship with no interference."
Asked what he meant by no interference, Dabbagh replied that Iraq did not want to be drawn into the disputes between Iran and the United States.
"Iraq cannot pay the cost for that. As Iraq cannot be used by Iran to attack the United States, also Iraq cannot be used as a base for America to attack Iran."
Its a lose lose for the U.S. then, if the democratically elected government of Iraq decides not to use Iran's help because of the U.S. then it will be obvious who really controls the country, and if they do decide to accept their help then Iran gains more control in the region.