Barack Obama insisted Monday he had faith in the Afghan war mission after former Pentagon chief Robert Gates charged the president lacked passion for military action and soured on his own troop surge.
In his first public comments on criticisms of his role as commander-in-chief in new memoirs by Gates, Obama said he had a duty to constantly question US military tactics and "sweat the details" when sending young men and women to war.
But the president declined to say whether he had been irked by the publication of the book while he was still in office and American forces remained on the battlefield.
Gates sparked a Washington firestorm when he suggested in "Duty" -- to be published Tuesday -- that Obama became disillusioned with the troop surge strategy launched in 2009 by early 2011, and lost confidence in his troop commanders and Afghan President Hamid Karzai.
While praising Obama for his integrity and intellectual approach to matters of state, Gates is reported to have written that the president showed less zeal for military engagements than his predecessor George W. Bush.
"One quality I missed in Obama was passion, especially when it came to the two wars," Gates wrote, according to Fox News.
Obama, however, said that he "continued to have faith" in the US mission in Afghanistan.
"Most importantly I've had unwavering confidence in our troops and their performance in some of the most difficult situations imaginable," the president said.
"And that job is not yet done."
After an exhaustive policy review, Obama announced a 30,000-strong troop surge in December 2009 designed to check the momentum of the Taliban, to disrupt and dismantle Al-Qaeda and to train the Afghan army.
He stipulated however that the surge would begin to be drawn down in 2011. NATO nations later agreed to end all combat operations after a 13-year war by the end of this year.
The frank criticism from Gates, who served both Bush and Obama as defense secretary, was all the more surprising considering he is known in Washington for loyalty and disdaining the often grubby business of politics.
Still, Obama said that Gates did an "outstanding job" as secretary of defense and remained a good friend.
In an interview broadcast Monday, the former Pentagon chief complained that the contents of his book, leaked to some newspapers, had been hijacked by those with a political axe to grind.
"I think the book is very even-handed, I don't vilify anybody," he told NBC's "Today Show."
"I make it clear, I have a lot of respect for both president Bush and President Obama," said Gates.
He said that "what has been lost in the news media is that I actually agreed with virtually every decision President Obama made" on how to handle the US war in Afghanistan.
Gates, a Washington veteran who also once headed the CIA, made a distinction between Obama and the rest of the White House.
While his criticism of Obama is coupled with praise and respect, Gates makes no apologies for his blunt criticism of Vice President Joe Biden and of the White House staff.
"Well, I had a lot of battles with those folks," he told NPR, referring to members of Obama's National Security Council staff.
Having worked in such positions under four previous presidents, Gates said the meddling behavior of the young staff members -- including making calls to four-star generals -- would have constituted "a firing offense" in previous administrations.
Gates also made no effort to back away from his harsh words for the vice president, whom he wrote was wrong about every major foreign policy issue over the past four decades.
The former Pentagon chief said he had long disagreed with Biden on issues dating back to the 1970s.
As a senator, Biden was wrong to vote against aid for South Vietnam in the 1970s, portrayed the Shah's fall in Iran as a boost to human rights and wrongly opposed the defense buildup under ex-president Ronald Reagan, Gates said.
"I, frankly, over a long period of time felt that he had been... wrong," he added.
The White House has vigorously defended Biden, who was in Israel on Monday at former prime minister Ariel Sharon's funeral, as a statesman.