George Bush travelled to violence-rattled Baghdad on Tuesday, less than a week after the death of Abu Musab al-Zarqawi, the al-Qaeda in Iraq leader, in a bombing attack.
Bush assured the Iraqi people of US support for them and their new government.
"It's in our interest that Iraq succeed," he said, seated alongside Nuri al-Maliki, the new Iraqi prime minister.
Al-Maliki, who apparently did not know Bush was coming until five minutes before they met, said Iraq was "determined to succeed, and we have to defeat terrorists and defeat all the hardships".
"God willing, all the suffering will be over. And all the soldiers will return to their country with our gratitude for what they have offered, the sacrifice," al-Maliki said through a translator.
About 132,000 US troops are
stationed in Iraq
Bush made it clear, however, that a US military presence - now at about 132,000 troops - would continue for a while.
"I have expressed our country's desire to work with you, but I appreciate you recognise the fact that the future of the country is in your hands," he said.
The president also told al-Maliki that he was "impressed with the cabinet you have assembled".
Bush met the Iraqi prime minister in the heavily fortified Green Zone at a palace once used by Saddam Hussein, the deposed president. It now serves as the US embassy.
The trip, expected to last a little more than five hours, was known only to a handful of aides and a small number of reporters sworn to secrecy.
The administration hoped the death of al-Zarqawi and the completion of al-Maliki's cabinet would make war-weary Americans look at Iraq in a more positive light.
Aside from al-Maliki and his cabinet, Bush was to see Jalal Talibani, Iraq's president.
Bush was also to meet with the speaker of the parliament, national political leaders and US troops.