BAGHDAD - The U.S. military on Wednesday marked the end of its combat mission in Iraq amid a series of conflicting messages that underscored the mixed feelings both Americans and Iraqis have toward a 7 1/2-year effort that cost tens of thousands of lives but left the political outcome undecided.

"The problem with this war for, I think, many Americans is that the premise on which we justified going to war proved not to be valid, that is Saddam [Hussein] having weapons of mass destruction," Defense Secretary Robert Gates told reporters as he hopped from one stripped-down U.S. military base to another Wednesday greeting U.S. troops.

"So when you start from that standpoint, then figuring out in retrospect how you deal with the war -- even if the outcome is a good one from the standpoint of the United States -- it will always be clouded by how it began."

Differing Iraqi views

Iraqis, too, expressed ambivalence about the U.S. declaration that combat operations now would be giving way to "partnering efforts" led by Iraqis and would conclude with the complete withdrawal of the remaining 50,000 U.S. troops by the end of 2011.

"I am torn," said Widad Hameed, a retired high school teacher. "I am strongly opposed to the presence of foreign troops on Iraqi sovereign soil -- and therefore hope to see them leave as quickly as possible. This is on principle.

"But on the other hand, I am afraid of what might happen after they leave. I have no great faith in the abilities of the [Iraqi security forces] and feel that the chaos in our political situation will be reflected upon the security scene as the politicians slug it out and violence will rise and the people will pay."

Other Iraqis said they were thrilled that the end of the U.S. occupation appeared closer. "The departure of the occupation forces will mark the beginning of our path toward stability, and not the other way around," said Falah Hasen Shenshel, a follower of cleric Muqtada al-Sadr, whose militia often clashed with U.S. troops in the early years of the war.

On Wednesday, Vice President Joe Biden, Gates and other top U.S. military leaders, including Adm. Michael Mullen, the chairman of the Joint Chiefs of Staff, presided over a ceremony that passed command of U.S. forces in Iraq from Gen. Ray Odierno to Gen. Lloyd Austin. Operation Iraqi Freedom became Operation New Dawn, and the American military mission became one of training as U.S. forces draw down to zero.

Hundreds of troops gathered for the hourlong ceremony inside a Saddam-era palace at Camp Victory. As Iraq's ministers of defense and interior looked on, Biden declared an end to the U.S. combat mission and said that the United States sought an "economically prosperous and stable" Iraq.

'Enduring relationship'

In his speech, Odierno said he was confident that Iraqi security forces, now numbering 660,000, can protect the country. Austin said the next phase would be the start of an "enduring relationship" between Iraq and the United States.

Everyone, however, remained cautious about the road ahead.

A senior commander told reporters traveling with Gates that while combat operations are officially over, U.S. forces partnered with Iraqis could still face fire -- and would return it.

During a question-and-answer period with troops in Ramadi, Gates told soldiers they still deserved combat pay, even as he told them they were now trainers, not fighters.

Asked if it had all been worth it, Gates suggested it was too early to judge. "It really requires a historian's perspective in terms of what happens here in the long run," he said. "I think that where we are today that our men and women in uniform believe we have accomplished something that makes the sacrifice and the bloodshed not to have been in vain. How it all weighs in the balance over time remains to be seen."