The U.S. intelligence community says in a secret new assessment that the war in Afghanistan is mired in stalemate, and warns that security gains from an increase in American troops have been undercut by pervasive corruption, incompetent governance and Taliban fighters operating from neighboring Pakistan, according to U.S. officials.

The sobering judgments, laid out in a classified National Intelligence Estimate completed last month and delivered to the White House, appeared at odds with recent optimistic statements by Pentagon officials and have deepened divisions between U.S. intelligence agencies and American military commanders about progress in the decade-old war.

The detailed document, known as an NIE, runs more than 100 pages and represents the consensus view of the CIA and 15 other U.S. intelligence agencies. Similar in tone to an NIE prepared a year ago, it challenges the Pentagon’s claim to have achieved lasting security gains in Taliban strongholds in southern Afghanistan, according to U.S. officials who have read or been briefed on its contents.

PHOTOS: A decade of conflict in Afghanistan

In a section looking at future scenarios, the NIE also asserts that the Afghan government in Kabul may not be able to survive as the U.S. steadily pulls out its troops and reduces military and civilian assistance.

“Its viability is tenuous,” said one official, citing the report.

Although the review gives the U.S. military and its allies credit for driving the Taliban out of some areas last year, it says the gains were not enough to bolster the weak central government in Kabul, haven’t diminished the Taliban’s will to keep fighting, and haven’t instilled confidence among Afghans in much of the country.

As a result, the NIE warns that the overall difficulties could jeopardize the Obama administration’s plans to withdraw most U.S. troops and hand over responsibility for the war to the Afghan government by 2014.

The findings prompted a sharp response from Marine Corps Gen. John Allen, the U.S. commander of Western forces in the war, and Ryan Crocker, the U.S. ambassador to Afghanistan, who filed their objections in a one-page written dissent. The comment was also signed by Marine Corps Gen. James Mattis, commander of Central Command, and Adm. James Stavridis, supreme allied commander of the North Atlantic Treaty Organization.

Military and Pentagon officials argued that assumptions used by intelligence agencies were flawed.

“It assumes a quicker drawdown of U.S. support to the Afghan government than a lot of people are projecting, " said one U.S. official familiar with Pentagon thinking, speaking of the assessment.

Military officials also cited what they claim are gaps in the intelligence agencies’ understanding of the Taliban leadership’s thinking, the officials said.

Some in Congress and the Obama administration are concerned that the bleak assessment suggests little progress was made in the last year. During that time, the U.S. has suffered more than 400 military fatalities and spent more than $100 billion. As of Wednesday, 1,873 Americans had been killed in Afghanistan since U.S. forces invaded in late 2001, according to the website icasualties.org.

Army Gen. David H. Petraeus wrote a dissent to last year’s NIE when he was U.S. commander in the war. He is now CIA director, and he pledged during his Senate confirmation hearings not to allow his personal views as a former commander to color the CIA’s analysis.

The recent NIE agrees with the military that Afghan Taliban fighters have found safe haven in Pakistan’s tribal areas. After a six-week lull, CIA drone strikes resumed this week in North Waziristan, reportedly killing four people Wednesday, but U.S. officials warned that drone strikes alone cannot prevent Afghan insurgents from regrouping there.

“It’s all about the safe haven,” one congressional official said. “That has to be solved.”

Military officials have acknowledged that there are no easy answers, and that a peace deal may be the only solution.

The Taliban has suffered heavy losses, particularly in southern Afghanistan, but it also has gained ground in the country’s east, near Pakistan, according to officials briefed on the NIE. But the intelligence community is not convinced that military gains in the south can be maintained once large numbers of U.S. forces withdraw.

The Afghan army and in particular the police face enormous problems contending with the insurgency as U.S. assistance declines, the document concludes. But it also raises doubts about whether Afghan civilian ministries can govern successfully in the south and other areas.

In late 2009, President Obama agreed to deploy 33,000 additional troops to Afghanistan, and the total U.S. force in the country peaked at about 100,000 last summer. The U.S. now has 91,000 troops there, and all combat forces are scheduled to withdraw by 2014.

Pentagon planners assume that a residual force will remain to train and assist the Afghans, but the White House has yet to sign off on that. The Obama administration is negotiating a long-term military alliance with the government of Afghan President Hamid Karzai.

Pentagon officials insist that the troop increase has put the Taliban on its heels.

“We’re moving in the right direction and we’re winning this very tough conflict,” Defense Secretary Leon E. Panetta told troops on Dec. 14 at Forward Operating Base Sharana in the eastern province of Paktika.

Pentagon spokesman George Little said Wednesday that Panetta continues to believe there has been “substantial progress.” The key, he said, is “to strengthen Afghan security forces and to build toward a long-term relationship with Afghanistan.”

National intelligence estimates often carry significant weight in U.S. policy circles, although they are hardly immune from errors.

Most famously, the 2002 NIE on Iraq judged with high confidence that Saddam Hussein was secretly amassing chemical and biological weapons, and trying to build a nuclear bomb. The George W. Bush administration repeatedly cited that NIE before the 2003 invasion of Iraq, but it ultimately was proved inaccurate in almost every respect.

Although they declined to discuss the contents of the current NIE, some members of Congress with access to intelligence said they are concerned about the lack of progress in Afghanistan.

“I think there are real problems,” said Sen. Dianne Feinstein (D-Calif.), who chairs the Senate Intelligence Committee. “There have been gains in security … but the Taliban is still a force to be reckoned with. They still occupy considerable land in the country.”

Rep. Jan Schakowsky (D-Ill.), a member of the House Intelligence Committee, said the Obama administration should release an unclassified version of the NIE for public debate.

“I do think it would be very helpful to release an unclassified version,” she said. “Given the expense and the lives that are at stake, the American people should see some of the top-line conclusions of the NIE.”

PHOTOS: A decade of conflict in Afghanistan

ken.dilanian@latimes.com

david.cloud@latimes.com