. Iraqi television journalist Muntadar al-Zaidi stood up and shouted "this is a goodbye kiss from the Iraqi people, dog," before hurling a shoe at Mr Bush which narrowly missed him.
With his second shoe, which the president also dodged, Mr Zaidi said: "This is for the widows and orphans and all those killed in Iraq."
See it here.
President Bush ducks as the shoes are thrown
Mr Zaidi, a correspondent for Cairo-based al-Baghdadiya TV, was then wrestled to the ground by security personnel and hauled away.
"If you want the facts, it's a size 10 shoe that he threw," Mr Bush joked afterwards.
Correspondents say showing the soles of shoes is a sign of contempt in Arab culture. Iraqis threw shoes and used them to beat Saddam Hussein's statue in Baghdad after he was overthrown in 2003.
Mr Bush's unannounced visit to Baghdad came a day after Defense Secretary Robert Gates told US troops that the Iraq mission was in its "endgame".