Mahmoud Ahmadinejad's visit to former enemy Iraq is the first by an Iranian president. The two countries fought a long, bloody war in the 1980s.
Mr Ahmadinejad was given a red carpet welcome as he was greeted by Iraqi President Jalal Talabani at his Baghdad residence.
Mr Talabani described Mr Ahmadinejad's visit as "historic" and said Iraq would try to oust Iranian rebels based on the mountainous frontier between the two countries.
Mr Ahmadinejad said a "united, powerful and developed Iraq" was in the region's interests, adding: "A visit to Iraq without the dictator [Saddam Hussein] is a truly happy one".
Security has been tightened in the Iraqi capital for the two-day visit.
But US forces did not provide any additional security for Mr Ahmadinejad. The US accuses Iran of training and arming Shia militias.
The Americans are not the only ones wary of Mr Ahmadinejad's visit; this banner in Kirkuk reads: "We denounce Iran's intervention in Iraqi affairs".
However, nearly two-thirds of Iraqis are Shia Muslim and are happy to see closer ties with mainly-Shia Iran.