In their statement, the Taliban said Petraeus was not as smart as McChrystal and questioned his physical strength, noting his collapse during a congressional hearing last week.
The replacement was decided after McChrystal was quoted in an article in the Rolling Stones magazine in which he criticised Obama’s policy and strategy in Afghanistan.
The general’s public apology was not enough for the US president, who said he was not “personally insulted” by McChrystal's comments, but called his conduct unbecoming. "The conduct represented in the recently published article does not meet the standard that should be set by a commanding general," Obama said. "It undermines the civilian control of the military that is at the core of our democratic system."
The Afghan government had earlier tried to persuade Obama not to remove McChrystal. Afghan President Hamid Karzai had established a strong relationship with the general who had accompanied on several visits around the country, clearly showing his support.
Waheed Omer, a spokesman for Afghan president, said Mr Karzai regretfully "respects" the decision, and “looks forward to working with his replacement.”
However, "We wish he hadn't gone, but this is America's internal issue," said General Zaher Azimi, a spokesman for the Afghan Defence Ministry.
"We expect him [Petraeus] to follow McChrystal's assessment, which has reduced civilian casualties, brought down arrests and house searches and involved coordination on operations," he added.
Obama made it clear that the change at the top of US forces in Afghanistan would not modify US strategy in the country.
The United States sent 30,000 new troops this year, many of whom are engaged in trying to secure Afghanistan's volatile southern promises, and plans to send more this summer.
A former British commander in Afghanistan, Colonel Richard Kemp, said, “The Taliban will be rubbing their hands together. McChrystal was a very competent commander”.