But as US intelligence efforts were trained on Iraq, there was no comparable attempt to map out the different groups facing off against American and allied forces in Afghanistan and Pakistan, according to multiple US government officials and analysts. A recent Obama administration review of US policy found American understanding of the nature of those adversaries to be seriously lacking.

"Over time in Iraq we developed a very nuanced understanding of the enemy," Petraeus, the top commander in the Middle East, told the Globe in response to e-mailed questions. "That proved invaluable as we worked with our Iraqi partners to determine which sub-groups, tribes, and other social elements might be reconcilable and which were truly irreconcilable."

Part spycraft, part history research, the project is an attempt to re-create the successes in Iraq in 2007 and 2008, when the United States and its allies were able to co-opt some elements of the Sunni-led insurgency and Shia militias and bring them into the fold of the Iraqi government. Enlisting the former enemies is credited with helping to dramatically reduce the number of attacks on US and Iraqi security forces.

"This is the key to moving forward," said Peter Bergen, a specialist on radical Islamic terrorism at the New America Foundation in Washington, D.C. "The easiest way to end an insurgency is to get people to stop being insurgents."

The initiative, which involves hundreds of intelligence operatives and analysts in the United States and overseas, is expected to culminate later this year in a detailed, highly classified analysis of the different factions of the Taliban and other groups. The overall effort is considered crucial to the long-term success of President Obama's goal of crushing the remnants of the Al Qaeda terrorist network and bringing stability to large swaths of the two countries that have become incubators for anti-US violence.

"You have a whole spectrum of bad guys that sort of get lumped into this catch-all term of Taliban . . . because they're launching bullets at us," said a senior defense official involved in the effort who like others was not authorized to speak publicly about intelligence matters. "There are many of the groups that can probably be peeled off."

Top military and intelligence officials say they know far too little about the disparate groups they are fighting in Afghanistan and Pakistan and believe many fighters have been incorrectly labeled as the Taliban, lumping those who pose the greatest threat with others who may be willing to share power with the Afghan and Pakistani governments.

WASHINGTON - US intelligence agencies have launched an intensive effort to examine the various tribes linked to the Taliban to determine whether some can be broken off through diplomatic and economic initiatives, mirroring the successful strategy employed by General David H. Petraeus in Iraq, according to Defense Department officials.

In response, one senior military official involved in the effort said intelligence analysts have been instructed by top officials in the Pentagon, the State Department, and the National Security Council to return to the basics, including dissecting "Who is the Taliban and who are the real bad guys?"

"We have insufficient [intelligence] capacity and capability when it comes to Afghanistan and Pakistan," said the official, adding that the intent of the intelligence work is to establish "a more granular understanding of tribes, social structures, and the enemy as the effort in Afghanistan moves forward."

The first step, officials said, will be identifying the remnants of the Afghan Taliban who ruled Afghanistan until it was overthrown by US-led forces in late 2001 for harboring the planners of the 9/11 attacks.

They include leaders possibly open to dialogue, such as Mawlawi Jalaluddin Haqqani and Gulbuddin Hekmatyar, Afghans who are believed to be potential rivals for power with the more radical Taliban leader Mullah Muhammed Omar, who escaped the US onslaught in 2001. Some Taliban leaders are reportedly talking through intermediaries about a potential peace deal with the Afghan government.

Then there are Al Qaeda's leaders and other foreign Arabs aligned with them who used Afghanistan as a haven to plan attacks on the United States and are now believed to be relying on neighboring Pakistan as a base of operations. They are considered by most specialists to be irreconcilable to American overtures.

But there are other foreign elements, including Uzbeks, Chechens, and Uighurs, whose ultimate intentions are less understood, officials said.

"Many of those foreign elements have been there for 20 years," said the senior defense official. "They are the refuge of the first Afghan jihad" against the Soviet Union in the 1980s. "Some of those have actually intermarried within the tribes."

Meanwhile, there is the so-called Pakistani Taliban, perhaps symbolized by Baitullah Mehsud, one of the militants most wanted by American and Pakistani military forces for his role in orchestrating attacks on both sides of the porous border.

And there are also criminal elements such as the drug smugglers and what one official called angry local Pashtun tribes "who don't like anybody setting up shop in their area."

Specialists said untangling these different groups could be the key to achieving American aims.

"Some of them . . . may not be susceptible to dialogue or moderating influences," Hilary Synnott, a senior fellow at the International Institute for Strategic Studies in London, said recently in an online forum hosted by the Council on Foreign Relations. "But others, such as . . . those who are being coerced by extremists of whom they disapprove, or those who are frustrated by the lack of alternative opportunities, may be persuaded or induced to lay down their arms and work for peace."

But Bergen, who has spent considerable time in the region, warned that reaching durable agreements with more moderate elements will prove more difficult than it was in Iraq - especially when they see the 21,000 additional American military forces that Obama is sending this year to Afghanistan.

"It's going to be more complex to do deals with the Taliban than people think," Bergen said. In their view, "more brigades are not coming to make peace deals. They are going to kill a lot of people."

Bryan Bender can be reached at bender@globe.com.

© Copyright 2009 Globe Newspaper Company.