Iraq is still struggling even to ensure its own security. Its air force has no jet fighters, and U.S. officials say it would be unable to detect incoming aircraft in time to stop them. The Iraqi army is improving, but its ability to mount complex operations remains weak. The Iraqis still have a long way to go on intelligence, training and logistics.
On the political side of things, the democratic system the U.S. fought to establish is becoming increasingly authoritarian and remains divided along tribal and sectarian lines. Its ruling coalition includes parties allied with Iran. Its minority Sunni Muslims and Kurds are worried about their futures.
At the almost perfunctory ceremony Thursday in a dusty courtyard at Baghdad's international airport to formally mark the U.S. military mission's end, no one even tried to use the word "victory."
But that shouldn't come as a surprise.
Two years ago, the Army general who is now chairman of the joint chiefs of staff, Martin E. Dempsey, commissioned a panel of historians to study how wars come to an end. Dempsey could see that the long wars in Iraq and Afghanistan, conflicts to which he and his colleagues had devoted almost a decade, weren't heading for the clear conclusions that Americans yearn for. "Whatever happened to good old-fashioned victory?" the general, a former English professor at West Point, wondered at the time.
The answer, the scholars told him, was that most wars don't end with clear-cut winners and losers, especially long counterinsurgency wars of the sort we've been fighting in Iraq and Afghanistan. In that kind of conflict, it's hard to know when it's safe to claim progress, let alone victory.
In Washington, the withdrawal is an election-year talking point for both Republicans and Democrats. Obama is claiming credit for ending an increasingly unpopular war. Contenders for the GOP nomination are charging that Obama has "abandoned" Iraq, and that he should have pushed harder to win permission for about 5,000 military trainers and advisors to stay behind. (Negotiations on that issue broke down after Iraq refused to grant legal immunity to the troops who would remain.)
In Baghdad, the withdrawal was an even hotter political issue. Iraqi politicians, including Prime Minister Nouri Maliki, have spent years promising to end the American military presence. Negotiating a new agreement to allow thousands of foreign troops to remain in the country would have divided the coalition that keeps Maliki in power. The prime minister decided not to risk his job and to take credit for an American withdrawal instead.
Because of the Iraqi order to leave, the job of training and advising Iraq's armed forces has been taken away from a U.S. military command with years of hard-won experience and handed to a newly formed (and necessarily untested) civilian organization run by the State Department.
Officials acknowledge that they are scrambling to set up the new Office of Security Cooperation, and say privately that they will need luck as well as skill for it to come out right.
The State Department has never tried to run a mission this big, with an estimated 16,000 civilians and contractors, many of them doing jobs — training security forces, advising intelligence agencies, even flying helicopters and driving armored vehicles — that are normally military functions.
Given these circumstances, even carefully hedged claims of success at the Baghdad ceremony Thursday sounded a little like bravado.
"We salute the fact that Iraq is now fully responsible for directing its own path," Defense Secretary Leon E. Panetta said. "The mission of an Iraq that could fully govern and secure itself has become real."
In other words: Mission Partly Accomplished.
Dempsey, a reflective man who is a student of both literature and history, put the outcome in a broader context after the gathering.
"The term 'victory' is so elusive because the objectives [in most wars] change over time," he said, adding that despite such shifts he would "unequivocally term what we did in Iraq over the last eight years a success."
Thursday's ceremony in Baghdad wasn't the end of the U.S. entanglement in Iraq. The U.S. military is already looking for ways to return with a smaller footprint and lower profile, mainly through temporary advisory and training assignments.
But it's hard to imagine the United States attempting again the kind of massive and costly counterinsurgency that has mired it in Iraq and Afghanistan for most of a decade.
At an estimated cost of as much as $1 trillion, with nearly 4,500 Americans dead, the Iraq war may stand as the definitive, chastening proof of what the historians told Dempsey two years ago: True victory is elusive, and a nation rarely exits a war with the same objectives it had on the way in.