Washington (CNN) -- President Barack Obama on Wednesday replaced Gen. Stanley McChrystal as commander of U.S. and allied forces in Afghanistan and nominated Gen. David Petraeus to replace him while affirming support for a counterinsurgency strategy encountering problems. The dramatic shift came a day after McChrystal's disparaging comments about America's civilian leadership surfaced, and reignited the national debate on the war in Afghanistan -- now in its eighth year with a June death toll  of coalition forces that is close to becoming the highest of the war. Obama accepted McChrystal's resignation "with considerable regret" and named Petraeus, the head of the U.S. Central Command, to take over pending Senate confirmation.
@highlight
NEW: Key senator says Petraeus backs July 2011 start of withdrawal from Afghanistan
@highlight
NEW: Confirmation hearing for Petraeus to start no later than Tuesday
@highlight
Lawmakers praise choice of Petraeus and say Obama had no choice but to accept McChrystal resignation
@highlight
Obama urges the Senate to confirm Petraeus swiftly
Stanley McChrystal
McChrystal
McChrystal
McChrystal
A source close to @placeholder offered a description of the roughly 30-minute meeting between Obama and McChrystal that led to the general's resignation Wednesday morning.
Stanley McChrystal
McChrystal
McChrystal
McChrystal
A source close to McChrystal offered a description of the roughly 30-minute meeting between Obama and @placeholder that led to the general's resignation Wednesday morning.
David Petraeus
Petraeus
Petraeus
Petraeus
Petraeus
Petraeus
Immediate political reaction from both parties was positive, with lawmakers saying Obama had little choice in making a change and that @placeholder was the best choice for the job.
David Petraeus
Petraeus
Petraeus
Petraeus
Petraeus
Petraeus
@placeholder "is an outstanding military leader, but even he can't win in Afghanistan if the president continues to insist on an arbitrary withdrawal date -- a fact our enemies are counting on and our allies fear," said Sen.
David Petraeus
Petraeus
Petraeus
Petraeus
Petraeus
Petraeus
"We're not happy to see Gen. McChrystal go, but of all the choices that could have been made, we are happy to hear it is @placeholder who will continue the mission," Gen. Mohammad Zahir Azimi said.