BAGHDAD - President Barack Obama flew to Baghdad on Tuesday to meet U.S. military commanders and Iraqi leaders and assess security there first-hand after announcing a strategy to wind down the six-year war he opposed.

Obama's visit to Baghdad was shrouded in the security-conscious secrecy that marked similar trips made by his predecessor George W. Bush, whose foreign policy legacy was defined by the unpopular war that he launched in 2003 to topple Saddam Hussein.

The visit was not publicized beforehand and was made known only after Air Force One, flying from Istanbul at the end of Obama's first major international tour, had touched down at Baghdad International Airport.

Obama's arrival came a day after a string of seemingly coordinated bombings across the Iraqi capital killed 37 people. On Tuesday, a car bomb killed nine people and wounded 20 in the Shi'ite Kadhimiya district of northwest Baghdad, police said.

Under Obama's new Iraq war strategy, announced in February, the roughly 140,000 U.S. troops now in Iraq will be drawn down to between 35,000 and 50,000 -- a number that anti-war critics consider too high -- by the end of August 2010. The mission of those left will be redefined mostly to help train Iraqi forces. But they too must leave by the end of 2011.

This is going to be a critical period, these next 18 months, Obama said, referring to the Aug 2010 deadline for the withdrawal of combat troops.

You will be critical in terms of us being able to make sure Iraq is stable, that it is not a safe haven for terrorists, and we can start bringing our folks home, Obama told troops gathered at Camp Victory, a sprawling U.S. base near the airport.

White House spokesman Robert Gibbs said the top U.S. commander in Iraq, General Ray Odierno, had told Obama that even with the recent spike in bombings, violence was at its lowest level since 2003.

But underscoring the fragile security, U.S. officials ruled out any idea of Obama traveling by motorcade into Baghdad after bad weather forced the cancellation of a planned helicopter trip into the city to meet Iraqi leaders.

Instead, Iraqi Prime Minister Nuri al-Maliki went to Camp Victory for talks with Obama.

Obama said he had come to Iraq for face-to-face meetings and to get a better sense of the security situation.

We spent a lot of time trying to get Afghanistan right (but) there's still a lot of work to be done here, he told reporters.

The sectarian warfare and insurgency unleashed by the 2003 U.S.-led invasion have receded sharply over the past year, but Iraqi security forces still face huge challenges as they take on policing and military operations from the United States.

MUCH WORK TO BE DONE

Obama took a tougher line than Bush in pressing the Iraqi

government to shoulder more responsibility for stabilizing the country and its institutions.

He said there had been significant progress in Iraq but that much work remained to be done by the leaders of Iraq's political factions to reach equitable, fair solutions.

They're going to have to decide that they want to resolve their differences through constitutional means and legal means, he said.

Iraq held its most peaceful elections since the invasion when a provincial ballot in January passed without a single major militant attack. But U.S. and Iraqi officials say tensions between rival factions are likely to rise as Iraq approaches a national election later in the year.

Maliki in particular emerged from the provincial election with a greatly enhanced political stature, a fact that has irked some of his Shi'ite Muslim rivals. Security experts say some of those rivals might be interested in stoking violence in order to undermine Maliki's ability to claim credit for increasing security.

The unresolved fate of the city of Kirkuk, which sits on rich oil reserves and is claimed by minority Kurds as their ancestral capital, and growing tensions between Kurds in their semi-autonomous region in the north and Arabs in Baghdad could ignite Iraq's next big ethno-sectarian conflict even as bloodshed between Shi'ite and Sunni Muslims begins to recede.

Scaling back troop levels in Iraq will help Obama boost troop numbers in Afghanistan to tackle worsening violence there. He had accused Bush of being too fixated on Iraq to focus on the more vital fight against Islamic militancy in Afghanistan.

MORE WELCOME THAN BUSH

Unlike Bush, blamed by many Iraqis for the tens of thousands who died after the invasion even as some acknowledge their gratitude for the fall of Saddam Hussein, Obama would be welcomed by Iraqis, analysts said.

Obama, a Democratic U.S. senator before he became president, opposed the war from the start.

No flying shoes this time for sure, said political analyst Hazem al-Nuaimi, referring to an Iraqi journalist who threw his shoes at Bush, forcing him to duck, during the then-U.S. leader's final visit to Iraq in December.

On the streets of Baghdad, many Iraqis asked about the visit were clear on insisting Obama back his words with action.

I hope he'll withdraw the U.S. troops...We need action. If he speaks, he must act. If it's just talk, he can stay away, said Qableh Mahmoud, a Baghdad housewife.