Washington - Gen. David H. Petraeus was unanimously confirmed by the U.S. Senate Wednesday as the new Afghan war commander, replacing Gen. Stanley A. McChrystal after his ouster over controversial remarks in a Rolling Stone magazine article.

The 99-0 Senate vote followed a confirmation hearing Tuesday in which members of the Senate Armed Services Committee praised Petraeus's leadership of the war in Iraq and lauded him as the nation's premier warrior-diplomat.

Petraeus told the committee members that the Afghan war, which he said is being waged against "an industrial-strength insurgency" is likely to get worse before it gets better.

"My sense is that the tough fighting will continue," Petraeus said. "Indeed, it may get more intense."

Petraeus said he would adhere to McChrystal's strategy of trying to avoid civilian deaths in Afghanistan, a keystone of the U.S. military's counterinsurgency approach. But in a nod to U.S. troops who have complained that McChrystal tied their hands by limiting tactics, Petraeus said he would "look very hard" at how directives issued by the former commander were being implemented.

"I will continue the emphasis on reducing the loss of innocent civilian life to an absolute minimum in the course of military operations," Petraeus said, adding that the rules of engagement for U.S. troops are "fairly standard."

A separate "tactical directive," he said, was designed to govern the use of air-launched weapons "because, of course, if you drop a bomb on a house, if you're not sure who's in it, you can kill a lot of innocent civilians in a hurry."

The general said that it is imperative that the directives are implemented uniformly throughout the force, and that "when our troops and our Afghan partners are in a tough spot . . . it's a moral imperative that we use everything we have to ensure that they get out."

In addition to discussing his strategy, Petraeus took care, both inside and outside the hearing room, to show how he would try to avoid the rifts among the U.S. military, senior civilian leadership and the Afghan government that in the end led to McChrystal's undoing.

As he drove to the hearing, for example, Petraeus had his third phone conversation in less than a week with Afghan President Hamid Karzai.

Afterward, he flew home to Tampa, where he hosted Vice President Biden and his wife for dinner.

Petraeus told lawmakers he has also reached out to Richard C. Holbrooke, the administration's top diplomat on Afghanistan and Pakistan, and will pick up Ambassador Karl W. Eikenberry en route to Kabul so that the two can arrive there together.

"We are all firmly united in seeking to forge unity of effort," Petraeus said.

McChrystal's removal, came after Rolling Stone reported disparaging comments from the general and his team about Biden, Holbrooke, Eikenberry and others, highlighted long-standing disagreements between civilian and military officials over the conduct of the war.

In Afghanistan on Wednesday, U.S. Attorney General Eric H. Holder Jr. met with Karzai and other top officials to discuss efforts to root out corruption in the war-scarred nation. Also Wednesday, there were new reports of violence, including a foiled attack by insurgents outside Jalalabad air base.

Obama has indicated that he will make no other immediate personnel changes in Afghanistan besides replacing McChrystal with Petraeus. Petraeus said Tuesday that members of his personal staff had agreed to accompany him to Kabul, but he made no mention of the status of senior officers who worked for McChrystal, including those in charge of operations, intelligence and other key tasks. Officials said Petraeus wants to assess the situation at the Afghanistan headquarters before making any decisions.

Sen. John McCain (Ariz.), the ranking Republican on the Armed Services Committee, called Petraeus an "American hero" for his role in stabilizing the war in Iraq, where he served as commander until becoming the head of the Tampa-based U.S. Central Command in 2008.

Petraeus parried GOP efforts to prod him into disagreement with Obama's July 2011 deadline for beginning a U.S. troop withdrawal. When McCain asked whether "there was a recommendation from you or anyone in the military" to set the date during White House strategy meetings last fall, Petraeus said, "There was not."

He agreed with McCain's assessment that a Marine offensive in Helmand province was not "going as well . . . as we had hoped" and that "we're not where we had wanted to be" when an upcoming military campaign in Kandahar was planned seven months ago.

"So that argues, then, for reassessment of the July 2011 commitment to begin a withdrawal," McCain concluded.

Although Petraeus and other military officials have emphasized that any withdrawal decision will be based on conditions on the ground, McCain quoted senior administration officials, including Biden and White House Chief of Staff Rahm Emanuel, who have said the date is fixed.

"Not only did I say that I supported it, I said that I agreed with it," Petraeus responded.

The general said he sees the strategy as a "message of urgency to complement the message of enormous additional commitment" in deploying an additional 30,000 U.S. troops. Rather than waiting for troops to withdraw, as Republicans have charged, Taliban insurgents are "fighting to break our will," he said.

There are "setbacks for every small success," Petraeus added. "But what you're trying to do is determine that the trajectory is generally upward, and that's indeed how we see it."