Ferocious infighting was punctuated by snide and bitter remarks during Afghan policy review according to author

Barack Obama was forced into a major damage-limitation exercise today after a new book by veteran investigative reporter Bob Woodward painted a startling portrait of the strained relations between the White House and top US generals.

Divisions within the US administration during an Afghanistan policy review last year – that led to 30,000 more personnel being sent to the war zone and the setting of a July 2011 deadline for a withdrawal – have been well reported. What is new is the level of personal acrimony that apparently accompanied that debate.

In Obama's War, published on Monday but leaked early to the New York Times, Woodward claims that the infighting was ferocious, and punctuated by remarkably snide and bitter remarks. On one occasion General David Petraeus, the US commander in Afghanistan, is quoted as saying, in reference to Obama's administration: "You fucked with the wrong guy."

Another damaging section of the book reveals that Obama needed the withdrawal deadline for domestic political reasons, to keep the Democratic party happy. The revelations leave the president vulnerable to fresh attacks by Republicans just as Obama and the Democrats are struggling in the polls ahead of congressional mid-term elections in November.

The Republicans immediately seized on the president's remark about the need for a deadline, and said party politics should not be dictating national security policy. "That's what it's all about folks, politics, pure politics," a Republican National Committee spokesman, Doug Heye, said.

The book also threatens to damage already strained relations between Washington and the Afghan president, Hamid Karzai, as well as with Pakistan.

Today the White House did not dispute Woodward's account, other than to correct a few minor points. But it stressed the extracts were selective and claimed that, when the book is read as a whole, Obama emerges as a president who is "analytical, strategic and decisive".

Among the other revelations are:

• Obama's special envoy, Richard Holbrooke, is quoted saying the Afghan policy "can't work". The vice-president, Joe Biden, describes Obama's special envoy to Afghanistan, Richard Holbrooke, as "the most egotistical bastard I've ever met".

• Karzai is alleged to be suffering from manic depression and taking medication. Woodward quotes Karl Eikenberry, the US ambassador, as saying: "He's on his meds, he's off his meds."

• The CIA has set up a 3,000-man Afghan paramilitary unit for covert cross-border operations, including assassinations, against al-Qaida and Taliban havens, not only in Afghanistan but in Pakistan.

• US intelligence told Obama that Pakistan is not a reliable partner in the Afghan conflict. The president is quoted as saying: "We need to make clear to people that the cancer is in Pakistan."

There was angry reaction to the book from Afghanistan, where the palace in Kabul denied Karzai has mental health problems. A close Karzai aide said the revelations would undermine a much improved relationship between Karzai and the Americans. "It adds fuel to the fire of our enemies. Can you imagine the laughter of Mullah Omar [the Taliban leader] over there, reading this?" the aide said.

But Abdullah Abdullah, foreign minister in Karzai's first cabinet turned opponent in last year's presidential election, said Karzai's alleged mental problems had caused problems for the country. "It has affected the situation because it affects his decision-making."

In Pakistan, senior officials said Woodword's claims were out of date. "That was 2009 and this is 2010. Things have come a long way since then," said Pakistan foreign office official, Abdul Basit.

Steve Clemons, director of the American Strategy Programme at the New American Fundation, which this month published a detailed report on Afghanistan, said the administration was due to review its policy in December and the revelations ensure "this will become a politial issue and re-open the convulsive process (last year's debate on strategy). The political problem for the administration is they have to look as if not a pawn of the Pentagon."

Blake Hounshell, managing editor of the Washington-based Foreign Affairs website, said the book would create enormous headaches for the White House. "If you thought the Rolling Stone article that got General Stanley McChrystal fired was damning, you ain't seen nothin' yet," he said.