Gen. David McKiernan was replaced after less than a year in the job. The new commander will be Lt. Gen. Stanley McChrystal, also an Army officer but with experience as a leader of special forces. McKiernan has a more conventional background.
"Today we have a new policy set by our new president. We have a new strategy, a new mission and a new ambassador. I believe that new military leadership also is needed," Gates said at a news conference.
It's the first time a commander in the middle of a war has been removed from his position since Gen. Douglas MacArthur in 1951. There was apparently pressure mounting for months from some military experts to replace McKiernan, reports CBS Evening News anchor Katie Couric.
McKiernan issued a short statement saying his time in Afghanistan made him proud to be an American soldier.
"All of us, in any future capacity, must remain committed to the great people of Afghanistan," he said.
McKiernan's exit comes as more than 21,000 additional U.S. forces begin to arrive in Afghanistan, dispatched by Mr. Obama to confront the Taliban more forcefully this spring and summer. Despite seven years of effort by the U.S. and allies, Afghanistan remains a battleground with an unstable government, flourishing opium trade and suicide attacks by supporters of al Qaeda.
Monday's announcement came a week after Afghan civilians were killed during a battle between militants and U.S. forces.
Afghan officials say up toin the battle in Farah, though the U.S. says that .
The U.S. on Saturday blamed Taliban militants for causing the deaths by using villagers as human shields in hopes they would be killed. A preliminary U.S. report did not say how many people died in the battle.
Gates said McChrystal, now a senior administrator with the Joint Chiefs of Staff, would be nominated for the top job in Afghanistan and that Lt. Gen. David M. Rodriguez would become McChrystal's deputy. The defense secretary urged the Senate to confirm the two quickly.
Mr. Obama approved 17,000 additional combat forces for Afghanistan this year, plus 4,000 trainers and other noncombat troops. By year's end, the United States will have more than 68,000 troops in the sprawling country - about double the total at the end of George W. Bush's presidency but still far fewer than the 130,000 still in Iraq.
McKiernan and other U.S. commanders have said resources they need in Afghanistan are tied up in Iraq.
Asked if McKiernan's resignation ends his military career, Gates said, "Probably."
Gates visited Afghanistan last week to see firsthand what preparations and plans were under way to set the president's counterinsurgency strategy in motion.
"As I have said many times before, very few of these problems can be solved by military means alone," Gates said Monday. "And yet, from the military perspective, we can and must do better."
He indicated that the Afghan campaign had long lacked the people and money needed in favor of the Bush administration's focus since 2003 on the Iraq war.
"But I believe, resources or no, that our mission there requires new thinking and new approaches from our military leaders," Gates said.
Sources close to the defense secretary said McKiernan was informed of the decision to relieve him of command during Gates' trip and showed extraordinary class when he heard the news, reports Couric.
Shortly afterward, the general sat down for anwith Couric and gave no indication his time in Afghanistan was coming to a close.
"Every day I'm here in Afghanistan I understand the people of this country a little bit better. And they are a very big-hearted people that want peace and they are friends of the United States of America. And so I don't lose hope," he said.
In June 2006 McChrystal was congratulated by then-President George W. Bush for his role in the operation that killed Abu Musab al-Zarqawi, the leader of al Qaeda in Iraq. As head of the special operations command, his forces included the Army's clandestine counterterrorism unit, Delta Force.
McChrystal came under fire for his role in the furor surrounding the friendly fire shooting of Army Ranger Pat Tillman - a former professional football star - in Afghanistan. An investigation at the time found that he was "accountable for the inaccurate and misleading assertions" contained in papers recommending that Tillman get a Silver Star award.
McChrystal acknowledged he had suspected several days before approving the Silver Star citation that Tillman may have died from friendly fire rather than enemy bullets. He sent a memo to military leaders warning them of that, even as they were approving Tillman's Silver Star. He told investigators that he still believed Tillman deserved the award.
The Army overruled a Pentagon recommendation that McChrystal be held accountable.