***CLICK HERE FOR UPDATES***
BAGHDAD - Flying unannounced into a still-dangerous war zone, President Barack Obama told U.S. troops and Iraqi officials alike Tuesday it is time to phase out America's combat role in a conflict he opposed as a candidate and has vowed to end as commander in chief.
With violence diminished but hardly disappearing -- a car bomb killed eight Iraqis just hours before Obama's arrival -- the president met with Prime Minister Nouri al-Maliki and emphasized that "we strongly support" steps to unite political factions, including integrating minority Sunnis into the government and security forces.
Iraqis "need to take responsibility for their own country," Obama told hundreds of cheering soldiers gathered in an ornate, marble palace near Saddam Hussein's former seat of power.
Watch video of Obama meeting with troops and see our slideshow:
President Obama greets military personnel at Camp Victory in Baghdad.
President Obama holds a joint press conference with Iraqi Prime Minister Nuri Al-Maliki.
Iraqis gather in a cafe in Najaf to watch news coverage of U.S. President Obama's visit to Iraq.
President Obama looks on during a meeting with US top general in Iraq Ray Odierno and National Security Advisor James Jones.
President Obama speaks with Iraqi President Jalal Talabani.
Obama speaks to troops in Iraq.
With General Odierno
Guards protecting Air Force One.
Earlier, the President holds a town hall meeting at Tophane Cultural Center in Istanbul, Turkey.
"You have given Iraq the opportunity to stand on its own as a democratic country. That is an extraordinary achievement," he told some 600 troops, saluting their efforts during six years of American fighting and losses.
"We love you," someone yelled from the crowd of photo-snapping men and women in uniform.
"I love you back," responded the president, repeating a sequence that played out at hundreds of campaign stops on his successful run for the White House last year.
Obama met with top U.S. commanders as well as senior Iraqi leaders on a visit of a little more than four hours that was confined to Camp Victory, the largest U.S. military base in a war that began in 2003 and has cost the lives of 4,265 members of the U.S. military. Many thousands more Iraqis have perished.
A helicopter flight to the heavily fortified Green Zone a few miles distant was scrapped, but White House aides attributed the change in travel plans to poor weather rather than security concerns.
Al-Maliki, appearing alongside Obama after their meeting, told reporters, "We assured the president that all the progress that has been made in the security area will continue."
American commanders told the president the country is experiencing a relatively low level of violence, although the car bomb explosion in a Shiite neighborhood of Baghdad was evidence of a recent resurgence. Obama flew from Turkey, the next-to-last stop on an eight-day itinerary that also included Britain, France, Germany and the Czech Republic.
Aides said Obama chose to visit Iraq rather than Afghanistan, where U.S. troops are also in combat, in part because it was close to Turkey and in part because of upcoming Iraqi elections.
In his remarks to the troops, Obama made no mention of the Afghanistan conflict -- where he has decided to commit 21,000 additional troops -- and it was not known whether it came up in his meeting with Gen. Ray Odierno, the top U.S. commander, and other officers.
Obama announced plans in February to withdraw U.S. troops from Iraq on a 19-month timetable, although a force as large as 50,000 could remain at the end of that period to provide counterterrorism duties.
He said that for the next year and a half, the United States will be a "stalwart partner" to the Iraqis. And yet, he said, "they have got to make political accommodations. They're going to have to decide that they want to resolve their differences through constitutional means and legal means. They are going to have to focus on providing government services that encourage confidence among their citizens.
"All those things they have to do. We can't do it for them."
By contrast, little more than a week ago, the president announced a revamped Afghanistan strategy that calls for stamping out the Taliban and al-Qaida and broadening the mission to include pressure on neighboring Pakistan to root out terrorist camps in its lawless border regions.
"We spend a lot of time trying to get Afghanistan right, but I think it is important for people to know that there is still a lot of work to do here," Obama said shortly after Air Force One touched down in the Iraqi capital.
Earlier, before departing Istanbul, the president told students, "Moving the ship of state takes time." Referring to his long-standing opposition to the war, he said, "Now that we're there," the U.S. troop withdrawal has to be done "in a careful enough way that we don't see a collapse into violence."
The military is in the process of thinning out its presence ahead of a June 30 deadline under a U.S.-Iraq agreement negotiated last year that requires all American combat troops to leave Iraq's cities. As that process moves forward, the increase in bombings and other incidents is creating concern that extremists may be regrouping.
While Obama spent much of the past week overseas grappling with the worldwide economic crisis and the war in Afghanistan, a constant theme of the trip was his determination to turn a new page in U.S. relationships abroad after eight years of the Bush administration.
Nowhere was that intention more evident than in Iraq, where a Bush-ordered invasion in 2003 began as a quick rout of forces loyal to Saddam Hussein before gradually turning into a murderous environment for U.S. troops.
Obama said American forces had "performed brilliantly ... under enormous strain."
"It is time for us to transition to the Iraqis," he said as an estimated 600 troops cheered. "They need to take responsibility for their country."
In Europe, he and other world leaders pledged cooperation to combat a global recession, and he appealed with limited success for additional assistance in Afghanistan, a war he has promised to intensify. The new president drew large crowds as he offered repeated assurances that the United States would not seek to dictate to other countries.
"I am personally committed to a new chapter of American engagement. We can't afford to talk past one another, to focus only on our differences, or to let the walls of mistrust go up around us." Obama said before leaving Turkey. The visit to a nation that straddles Europe and Asia was designed to signal a new era. He had pledged as a candidate to visit a majority-Muslim nation in his first 100 days in office.
President George W. Bush paid several trips to Iraq while in office, and on his last, in December, he had to duck shoes hurled in his direction at a news conference by an Iraqi journalist. By coincidence, the Iraqi Supreme Court reduced the prison sentence Tuesday for the man, Muntadhar al-Zeidi, now sentenced to one year in jail rather than three.