Former US Secretary of Defence Robert Gates has written a book strongly criticising President Barack Obama's handling of the war in Afghanistan.
In Duty: Memoirs of a Secretary of War, Mr Gates says that the president was sceptical that his administration's Afghan strategy would succeed.
"I never doubted [his] support for the troops, only his support for their mission," Mr Gates writes.
Mr Gates was Pentagon chief under Presidents Obama and George Bush.
He was the first Pentagon head to serve presidents of different parties before leaving political office in 2011.
Although he describes Mr Obama as "a man of personal integrity" who was right in his decisions regarding Afghanistan, he says that the president was uncomfortable with the wars in Iraq and Afghanistan, which he inherited from the Bush administration.
He also says Mr Obama was distrustful of the military that was providing him options.
He writes in the memoir that in March 2011 Mr Obama did not trust Gen David Petraeus - the US military commander in Afghanistan in 2010-11 - and "could not stand" Afghan President Hamid Karzai.
The president "doesn't consider the war to be his", Mr Gates writes of a March 2011 meeting in the White House. "For him, it's all about getting out."
The Washington Post says that the memoir is "in contrast to his subdued, even-keeled public demeanour as Pentagon chief", and that Mr Gates "strikes an often bitter tone in his memoir".
Mr Gates also includes scathing criticism of Vice-President Joe Biden, saying he had been "wrong on nearly every major foreign policy and national security issue over the past four decades".
In response, the National Security Council issued a statement on Tuesday saying Mr Obama relies on Mr Biden's "good counsel" every day, considering him "one of the leading statesmen of his time".
The former defence secretary voices frustration at the "controlling nature" of Mr Obama's White House, which he says constantly interfered in Pentagon affairs, even though civilian aides lacked knowledge of military operations.
The White House national security staff "took micromanagement and operational meddling to a new level," he writes, comparing their approach to that of the Nixon era of the 1970s.
"All too early in the administration," Mr Gates writes, "suspicion and distrust of senior military officers by senior White House officials - including the president and vice president - became a big problem for me as I tried to manage the relationship between the commander-in-chief and his military leaders."
A former White House adviser, David Axelrod, told NBC News' Today programme he was "surprised" by the criticism in the defence chief's book.
"He always indicated that he had a good working relationship with the president," Mr Axelrod said.
However, Mr Gates does give credit to the president for approving the raid on Osama Bin Laden's compound in Pakistan - which he himself initially opposed - describing it as "one of the most courageous decisions I had ever witnessed in the White House."
He is also effusive in his praise of former Secretary of State Hillary Clinton.