"It's completely understandable why the president made the decision that he did, based on the civilian-military relationship that goes a long way back," McCain said today on "Good Morning America." "I also point out to the president, with my strong support of Petraeus, we also need a new team over there as well -- perhaps at the embassy and other areas."
"I pointed out to the president that if he insists on a date-certain [withdrawal], rather than a conditions-based [withdrawal]... then we cannot succeed," McCain added.
McChrystal was recalled from Afghanistan for a Wednesday meeting with Obama after Rolling Stone printed an profile of the general in which he and his top aides made disparaging remarks about several top U.S. officials.
The profile published in Rolling Stone, titled "The Runaway General," characterized McChrystal as an outsider who did not relate well with the administration, and as a military leader who was "disappointed" with his first meeting with the president.
It highlighted the often tense relationship between the civilian and military arms of the U.S. command in Afghanistan, and included many disparaging comments about top U.S. officials, mostly made by McChrystal's aides.
In quick succession, the president met with McChrystal in the White House Wednesday, accepted his resignation, met with Petraeus just minutes later and asked him to take over the job.
McChrystal's conduct, as detailed in the Rolling Stone article, "does not meet the standard that should be set by a commanding general," the president said Wednesday. "It undermines the civilian control of the military that is at the core of our Democratic system, and it erodes the trust that's necessary for our team to work together to achieve our objectives in Afghanistan."
The president praised McChrystal for his "extraordinary dedication" and "love of the country," but made it clear the comments McChrystal and his aides made could jeopardize the U.S. mission in Afghanistan.
The decision to elect Petraeus for the position came from the president himself, Gates said today.
The 57-year-old commander is jokingly referred to by some in the military as a "water walker" with a near legendary ability to turn even the worst situations around.
He received enormous credit by many for turning the corner in Iraq where he served three different tours, the last overseeing the surge, but was also criticized heavily for his strategy.
It will be the second time Petraeus has replaced an officer whose career was sidetracked by a magazine profile. In 2008. Adm. William Fallon lost his job at Central Command after an Esquire article put him at odds with the Bush administration.
On the ground, news of McChrystal's dismissal and Petraeus' new position was met with surprise, but also a sense of relief that an experienced commander will take the helm.
As one Marine told ABC News, "the softball is teed up for Petraeus to hit it out of the park."
The war in Afghanistan has become the longest war in U.S. history, and more than 1,000 troops have died there since the U.S. invaded the country in 2001.
ABC News' Miguel Marquez and Nick Schifrin contributed to this report.