Ahmadinejad visited one of Iraq's most powerful Shia Muslim leaders

He also called on Washington to change its standpoint towards Iran and said it had to understand that the Iraqi people did not like America.

A BBC correspondent says many Iraqis see the visit as the culmination of a process of normalisation in ties.

The two countries fought a war when Saddam Hussein invaded Iran in 1980.

The BBC's Jim Muir adds that Mr Ahmadinejad has not been welcomed by all Iraqis, since some agree with the Americans' view that Iran supports extremist militias in Iraq and is to blame for much of the trouble there.

US weapons call

Mr Ahmadinejad, who arrived in Baghdad on Sunday, made his remark about the US and terrorism after US accusations that Iran was supporting militants.

"Six years ago, there were no terrorists in our region," he said after talks with Abdel Aziz al-Hakim, head of Iraq's largest Shia Muslim political bloc, the Supreme Council of the Islamic Revolution in Iraq (Sciri).

"As soon as the others landed in this country and the region, we witnessed their arrival and presence."

Earlier, at a news conference with Iraqi President Jalal Talabani, the Iranian president said it was not Tehran's fault that Iraq "does not want the US".

On Saturday, US President George W Bush, speaking at his ranch in Texas, called on Iran to "quit sending in sophisticated equipment that's killing our citizens".

The Iranian leader is due to end his visit on Monday. Iraqi Prime Minister Nouri Maliki has said a number of agreements will be signed.

'New page'

HAVE YOUR SAY The president's visit will bring benefit neither to the Iranians nor to the Iraqi people Farhad, Tehran

Iraqi leaders extended a warm welcome to the Iranian president, who flew into Baghdad airport and travelled into the city centre by car.

US forces are not involved in security for the visit and did not provide helicopters.

After talks with President Talabani, Mr Ahmadinejad said the visit had opened a "new page" in Iran-Iraq relations.

Prime Minister Maliki said his talks with Mr Ahmadinejad had been "friendly, positive and full of trust".

Despite the reconciliation between Baghdad and Tehran, many analysts believe that in the long term, the two countries are destined to be rivals for regional power.

During the long war between them in the 1980s, many of the prominent Shia now in positions of power in Iraq fled to Iran as Saddam Hussein cracked down on internal dissent.

The US-led overthrow of Saddam Hussein's regime allowed them to return from exile.

Trade is now growing between the two countries and tourism, in the form of Iranian pilgrims visiting major Shia shrines in Iraq, is booming.