The president -- who dodged both shoes -- was not hurt during the incident.
An official told The Associated Press on Monday that Muntadar al-Zeidi is being held for questioning by Prime Minister Nouri al-Maliki's guards and is being tested for alcohol and drugs.
The official spoke on condition of anonymity Monday because he was not authorized to talk to media.
White House Press Secretary Dana Perino, however, was hit in the eye with a microphone as security guards scrambled to restrain the man, later identified as Muntadar al-Zeidi, a correspondent for Al-Baghdadiya television -- an Iraqi-owned station based in Cairo, Egypt.
As al-Zeidi threw the first shoe at Bush, he shouted, "This shoe is for goodbye!" He then yelled, "You dog. You killed Iraqis," as he was tackled to the ground.
Neither leader was hit. In Iraqi culture, throwing shoes at someone is a sign of contempt; Iraqis whacked a statue of Saddam Hussein with their shoes after U.S. Marines toppled it to the ground in 2003.
"All I can report," Bush joked of the incident, "is a size 10."
Al-Baghdadiya television later released a statement, demanding the immediate release of reporter Muntadar al-Zeidi, who was detained following the incident. The television network said al-Zeidi threw the shoes at Bush "in accordance with the new era of freedom of speech and democracy that the U.S has promised the Iraqi people."
The president visited the Iraqi capital just 37 days before he hands the war off to President-elect Barack Obama, who has pledged to end it. The president wanted to highlight a drop in violence in a nation still riven by ethnic strife and to celebrate a recent U.S.-Iraq security agreement, which calls for U.S. troops to withdraw from Iraq by the end of 2011.
"There is still more work to be done," Bush said after his meeting with al-Maliki, adding that the agreement puts Iraq on solid footing. "The war is not over."
In many ways, the unannounced trip was a victory lap without a clear victory. Nearly 150,000 U.S. troops remain in Iraq fighting a war that is intensely disliked across the globe.
Polls show most Americans believe the U.S. erred in invading Iraq in 2003. Bush ordered the nation into war against Saddam Hussein's Iraq while citing intelligence claiming the Mideast nation harbored weapons of mass destruction. The weapons were never found, the intelligence was discredited, Bush's credibility with U.S. voters plummeted and Saddam was captured and executed.
For Bush, the war is the issue around which both he and the country defined his two terms in office. He saw the invasion and continuing fight as a necessary action to protect Americans and fight terrorism. Though his decision won support at first, the public now has largely decided that the U.S. needs to get out of Iraq.
In the news conference with al-Maliki, the U.S. president applauded security gains in Iraq and said that just two years ago "such an agreement seemed impossible."
"There is hope in the eyes of Iraq's young," Bush said. "This is the future of what we've been fighting for."
Said al-Maliki: "Today, Iraq is moving forward in every field."
Air Force One, the president's distinctive powder blue-and-white jetliner, landed at Baghdad International Airport in the afternoon local time after a secretive Saturday night departure from Washington. In a sign of security gains in this war zone, Bush received a formal arrival ceremony -- a flourish absent in his three earlier trips.
Bush soon began a rapid-fire series of meetings with top Iraqi leaders.
He met first with Iraqi President Jalal Talabani and the country's two vice presidents, Tariq al-Hashemi and Adel Abdul-Mahdi, at the ornate, marble-floored Salam Palace along the shores of the Tigris River. Defending the war, Bush said, "The work hasn't been easy, but it has been necessary for American security, Iraqi hope and world peace."
Later, Bush's motorcade pulled out the heavily fortified Green Zone and crossed over the Tigris so he could meet al-Maliki at the prime minister's palace. A huge orange moon hung low over the horizon as Bush's was ferried quickly through the city.
The two leaders sat down together for probably the last time in person in these roles. They signed ceremonial copy of the security agreement. Bush's national security adviser, Stephen Hadley, said the trip proved that the U.S.-Iraq relationship was changing "with Iraqis rightfully exercising greater sovereignty" and the U.S. "in an increasingly subordinate role."
The Bush administration and even White House critics credit last year's military buildup with the security gains in Iraq. Last month, attacks fell to the lowest monthly level since the war began in 2003. Still, it's unclear what will happen when the U.S. troops leave. While violence has slowed in Iraq, attacks continue, especially in the north. At least 55 people were killed Thursday in a suicide bombing in a restaurant near Kirkuk.
It was Bush's last trip to the war zone before Obama takes office Jan. 20. Obama won an election largely viewed as a referendum on Bush, who has endured low approval ratings because of the war and more recently, the U.S. recession.
Obama, a Democrat, has promised he will bring all U.S. combat troops back home from Iraq a little over a year into his term, as long as commanders agree a withdrawal would not endanger American personnel or Iraq's security. Obama has said that on his first day as president, he will summon the Joint Chiefs of Staff to the White House and give them a new mission: responsibly ending the war.
Obama has said the drawdown in Iraq would allow him to shift troops and bolster the U.S. presence in Afghanistan. Commanders there want at least 20,000 more forces, but cannot get them unless some leave Iraq.
The trip was conducted under heavy security and a strict cloak of secrecy. People who made the 10 1/2-hour trip with the president agreed to tell almost no one about the plans, and the White House released false schedules detailing activities planned for Bush in Washington on Sunday.
The new U.S.-Iraqi security pact, which goes into effect next month, replaces a U.N. mandate that gives the U.S.-led coalition broad powers to conduct military operations and detain people without charge if they were believed to pose a security threat. The bilateral agreement changes some of those terms and calls for all American troops to be withdrawn by the end of 2011, in two stages.
The first stage begins next year, when U.S. troops pull back from Baghdad and other Iraqi cities by the end of June.
Gen. Raymond Odierno, the top U.S. commander in Iraq, said Saturday that even after that summer deadline, some U.S. troops will remain in Iraqi cities.
FOX News' Ghaleb Tawfiq and the Associated Press contributed to this report.