Strained relations between the White House and its military leaders have been laid bare by former US defence secretary Robert Gates, who accuses President Barack Obama and his top civilian advisers of lacking faith in their own strategy for conducting the war in Afghanistan.

In a forthcoming memoir leaked to the New York Times and Washington Post that threatens to exacerbate current criticism of US policy in Afghanistan and Iraq, Gates – who was first appointed to his post by former President George W Bush – reveals, in a series of swipes that are surprisingly combative coming from such a senior former official, problems between the White House and the Pentagon that have made for troubling relations at the very highest levels.

“All too early in the administration,” adds Gates, “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.”

Perhaps most damagingly, he also alleges that Obama did not believe in his own strategy for ending the war in Afghanistan, which he was “skeptical if not outright convinced ... would fail,” and that he was skeptical at best about the leadership of the country’s president, Hamid Karzai.

“The president doesn’t trust his commander, can’t stand Karzai, doesn’t believe in his own strategy, and doesn’t consider the war to be his. For him, it’s all about getting out,” writes Gates.

Obama's policies toward both Afghanistan and Iraq are under fresh scrutiny this month, as Karzai has refused to sign a deal to retain a US military presence after the bulk of troops are withdrawn this year, and Iraq has faced renewed al-Qaida militancy.

On Tuesday, the White House defended its strategy, insisting it was up to both countries to ensure their own future stability. And in a statement released about the book, National Security Council spokeswoman Caitlin Hayden said:

Deliberations over our policy on Afghanistan have been widely reported on over the years, and it is well known that the President has been committed to achieving the mission of disrupting, dismantling and defeating al Qaeda, while also ensuring that we have a clear plan for winding down the war... As has always been the case, the President welcomes differences of view among his national security team, which broaden his options and enhance our policies. The President wishes Secretary Gates well as he recovers from his recent injury, and discusses his book.

In a short essay based on the book and published on Tuesday by the Wall Street Journal, Gates endorses Obama's troop surge in Afghanistan but casts doubt over the president's overall commitment to the fight there.

“[Obama's] fundamental problem in Afghanistan was that his political and philosophical preferences for winding down the US role conflicted with his own pro-war public rhetoric (especially during the 2008 campaign), the nearly unanimous recommendations of his senior civilian and military advisers at the Departments of State and Defense, and the realities on the ground,” he says.

Gates, who is the only person to have served as defence secretary in both a Democratic and a Republican administration, contrasts the attitudes of his two former bosses towards the military in ways that may provide ammunition to Obama's critics, while at the same time heartening supporters anxious about Pentagon influence on policy-making.

“The relationship between senior military leaders and their civilian commander in chief is often tense, and that was certainly my experience under both Bush and Obama,” he concludes in the WSJ. “Bush was willing to disagree with his senior military advisers, but he never (to my knowledge) questioned their motives or mistrusted them personally. Obama was respectful of senior officers and always heard them out, but he often disagreed with them and was deeply suspicious of their actions and recommendations.”

According to descriptions of the book published by the Times and Post ahead of its publication on January 14, Gates is particularly scathing toward vice-president Joe Biden.

Gates does call Biden a “man of integrity,” but says he “poison[ed] the well” in the Obama administration against military leaders, and writes, “I think he has been wrong on nearly every major foreign policy and national security issue over the past four decades.”

He also says he ordered Pentagon officials to hide information from Samantha Power, the current US ambassador to the United Nations, who was then working as a national security council adviser. “Don’t give the White House staff and [national security staff] too much information on the military options,” he writes, according to the Post. “They don’t understand it, and ‘experts’ like Samantha Power will decide when we should move militarily.”

Clashes between the White House and Pentagon are far from unknown, although Gates insists military relations with the Obama administration were particularly bad.

“The White House tightly controls every aspect of national security policy and even operations,” he claims. “His White House was by far the most centralized and controlling in national security of any I had seen since Richard Nixon and Henry Kissinger ruled the roost.”