BAGHDAD — Gen. David Petraeus, whose strategy for countering the Iraq insurgency is credited by many with rescuing the country from all-out civil war, stepped aside Tuesday as Gen. Ray Odierno took over as the top American commander of the conflict.
At a traditional change-of-command ceremony attended by top Iraqi and American military and civilian officials, Petraeus said that Odierno’s skills and experience make him ‘‘the perfect man for the job.’’
With Defense Secretary Robert Gates presiding at the ceremony in a cavernous rotunda of a former Saddam Hussein palace outside Baghdad, Petraeus handed over the flag of his command, known as Multi-National Force Iraq, to Odierno and then bade farewell.
Petraeus said the insurgents and militia extremists who have created such chaos in Iraq over the past five years are now weakened but not yet fully defeated. He noted that before he took the assignment in February 2007 he had described the situation as ‘‘hard but not hopeless.’’
He thanked his troops for having ‘‘turned ’hard but not hopeless’ into still hard but hopeful.’’
Despite the security gains, insurgents retain the ability to carry out devastating attacks. On Monday evening, a female suicide bomber blew herself up among a group of police officers northeast of Baghdad, killing at least 22 people. Hours earlier, car bombs in the capital killed 13 people.
Because of Odierno’s extensive previous experience in Iraq, he is generally expected to be able to continue building on the gains made under Petraeus’ command, although an evolving set of difficult challenges face him here and in Washington, where he will soon have a new commander in chief.
A major part of Odierno’s job will involve working with Iraqi political leaders, in tandem with U.S. Ambassador Ryan Crocker. In that role Odierno may call on his experiences in 2004-05 as assistant to the chairman of the Joint Chiefs of Staff, when he was the Pentagon’s liaison to Secretary of State Condoleezza Rice and traveled abroad with her frequently.
Odierno commanded the 4th Infantry Division during the opening months of the war in 2003. He returned in December 2006, at perhaps the darkest hour for the American-led enterprise, to be the No. 2 commander under Petraeus. He finished that tour in February 2008.
When he arrived in Baghdad on Saturday, Odierno recalled after accepting the handover from Petraeus, ‘‘I felt like I had never left, but I also felt like I was coming back to my second home.’’
Also addressing the ceremony was Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, who said Iraq had become a ‘‘vastly different place’’ during Petraeus’ tenure.
‘‘In more places and on more faces we see hope,’’ Mullen said.
Gates recalled the perils faced by Petraeus in February 2007.
‘‘Darkness had descended on this land,’’ Gates said. ‘‘Merchants of chaos were gaining strength. Death was commonplace,’’ and people around the world were wondering whether any Iraq strategy would work.
‘‘Slowly, but inexorably, the tide began to turn,’’ Gates said. ‘‘Our enemies took a fearsome beating they will not soon forget. Fortified by our own people and renewed commitment, the soldiers of Iraq found new courage and confidence. And the people of Iraq, resilient and emboldened, rose up to take back their country.’’
Injecting a bit of humor, Gates made note of what he called ‘‘one other historical achievement’’ for the new command team of Odierno and Lt. Gen. Lloyd Austin, who replaced Odierno in February as the No. 2 commander and will remain until next spring.
‘‘Between Gen. Odierno and Lt. Gen. Austin we just might have the tallest command in American military history — about 13 feet of general by my estimate,’’ Gates said. Each of the generals is nearly 6 feet 6 inches tall.
Odierno told the gathering that while much remains for the U.S. military to accomplish here, the Iraqis must take charge. ‘‘This struggle is theirs to win,’’ he said.
Petraeus’ next assignment will be as commander of U.S. Central Command, with broader responsibilities. From his headquarters in Tampa, Fla., he will oversee U.S. military involvement across the Middle East, including Iraq, as well as Afghanistan, Pakistan and other Central Asian nations. He takes up that post in late October.