Baghdad - The United States military officially declared an end to its mission in Iraq on Thursday even as violence continues to plague the country and the Muslim world remains distrustful of American power.
In a fortified concrete courtyard at the airport in Baghdad, Defense Secretary Leon E. Panetta thanked the more than one million American service members who have served in Iraq for “the remarkable progress” made over the past nine years but acknowledged the severe challenges that face the struggling democracy.
“Let me be clear: Iraq will be tested in the days ahead — by terrorism, and by those who would seek to divide, by economic and social issues, by the demands of democracy itself,” Mr. Panetta said. “Challenges remain, but the U.S. will be there to stand by the Iraqi people as they navigate those challenges to build a stronger and more prosperous nation.”
The muted ceremony stood in contrast to the start of the war in 2003 when an America both frightened and emboldened by the attacks of Sept. 11, 2001, sent columns of tanks north from Kuwait to overthrow Saddam Hussein.
As of last Friday, the war in Iraq had claimed 4,487 American lives, with another 32,226 Americans wounded in action, according to Pentagon statistics.
The tenor of the 45-minute farewell ceremony, officially called "Casing the Colors,” was likely to sound an uncertain trumpet for a war that was started to rid Iraq of weapons of mass destruction it did not have. It now ends without the sizable, enduring American military presence for which many officers had hoped.
Although Thursday's ceremony marked the end of the war, the military still has two bases in Iraq and roughly 4,000 troops, including several hundred who attended the ceremony. At the height of the war in 2007, there were 505 bases and more than 170,000 troops.
According to military officials, the remaining troops are still being attacked on a daily basis, mainly by indirect fire attacks on the bases and road side bomb explosions against convoys heading south through Iraq to bases in Kuwait.
Even after the last two bases are closed and the final American combat troops withdraw from Iraq by Dec. 31, under rules of an agreement with the government in Baghdad, a few hundred military personnel and Pentagon civilians will remain, working within the American Embassy as part of an Office of Security Cooperation to assist in arms sales and training.
But negotiations could resume next year on whether additional American military personnel can return to further assist their Iraqi counterparts.
Senior American military officers have made no secret that they see crucial gaps in Iraq's ability to defend its sovereign soil and even to secure its oil platforms offshore in the Persian Gulf. Air defenses are seen as a critical gap in Iraqi capabilities, but American military officers also see significant shortcomings in Iraq's ability to sustain a military, whether moving food and fuel or servicing the armored vehicles it is inheriting from Americans or the fighter jets it is buying, and has shortfalls in military engineers, artillery and intelligence, as well.
The tenuous security atmosphere in Iraq was underscored by helicopters that hovered over the ceremony, scanning the ground for rocket attacks. Although there is far less violence across Iraq than at the height of the sectarian conflict in 2006 and 2007, there are bombings on a nearly daily basis and Americans remain a target of Shiite militants.
Mr. Panetta acknowledged that “the cost was high — in blood and treasure of the United States, and also for the Iraqi people. But those lives have not been lost in vain — they gave birth to an independent, free and sovereign Iraq.”
The war was started by the Bush administration in March 2003 on arguments that Iraq had weapons of mass destruction and had ties to Al Qaeda that might grow to an alliance threatening the United States with a mass-casualty terrorist attack.
As the absence of unconventional weapons proved a humiliation for the administration and the intelligence community, the war effort was reframed as being about bringing democracy to the Middle East.
And, indeed, there was euphoria among many Iraqis at an American-led invasion that toppled Saddam Hussein. But the support soon soured amid a growing sense of heavy-handed occupation fueled by the unleashing of bloody sectarian and religious rivalries. The American presence also proved a magnet for militant fighters and an Al Qaeda-affiliated group took root among the Sunni minority population in Iraq.
While the terrorist group has been rendered ineffective by a punishing series of Special Operations raids that decapitated the organization, intelligence specialists fear that it is in resurgence. The American military presence in Iraq, viewed as an occupation across the Muslim world, also hampered Washington's ability to cast a narrative from the United States in support of the Arab Spring uprisings this year.
Even handing bases over to the Iraqi government over recent months proved vexing for the military. In the spring, commanders halted large formal ceremonies with Iraqi officials for base closings because insurgents were using the events as opportunities to attack troops. “We were having ceremonies and announcing it publicly and having a little formal process but a couple of days before the base was to close we would start to receive significant indirect fire attacks on the location,” said Col. Barry Johnson, a spokesman for the military in Iraq. “We were suffering attacks so we stopped.”
Across the country, the closing of bases has been marked by a quiet closed-door meeting where American and Iraqi military officials signed documents that legally gave the Iraqis control of the bases, exchanged handshakes and turned over keys.
The chairman of the Joint Chiefs of Staff, Gen. Martin E. Dempsey of the Army, has served two command tours in Iraq since the invasion in 2003, and he noted during the ceremony that the next time he comes to Iraq he will have to be invited.
“I kind of like that, to tell you the truth,” General Dempsey said.
This article, "US Officially Ends Its Mission in Iraq," originally appeared at The New York Times News Service.