For eight years since the attacks of Sept. 11, 2001, the U.S. has focused mostly on Afghanistan's Taliban as an unabashed ally of al-Qaida.
Now, however, forced to choose between sending more troops in an intensified counterinsurgency campaign against Afghanistan's Taliban or largely maintaining troop levels and using more drone strikes to take out al-Qaida along the border, U.S. officials must first determine which enemy is the greater priority.
That dilemma is complicated by the recent rise of a Pakistani faction of the Taliban that operates in close proximity with al-Qaida - even as al-Qaida has lessened activities with its former Afghan Taliban hosts, according to some administration officials.
U.S. officials face a tough challenge in dissecting the structure and leanings of the militant organizations on both sides of the often indiscernible Afghanistan-Pakistan border, and understanding their murky and evolving ties to al-Qaida.
"You cannot meaningfully distinguish between al-Qaida and the co-linked (militant) networks - either in terms of understanding the landscape or crafting a policy response," said Vahid Brown, a researcher at the Combating Terrorism Center at West Point.
"If you think you can kill al-Qaida leaders, as opposed to doing a broader scale effort against the militant environment, that notion is based on a fundamental misapprehension of the nature of the terrain," said Brown, describing the complexity of the networks along the border and their threat.
With concerns about Pakistani militants growing, an influential faction inside the administration that includes Vice President Joe Biden is pushing for the U.S. to concentrate more on al-Qaida and less on the Afghan Taliban.
But the push for that strategy butts up against the long-perceived union between al-Qaida and the Afghan Taliban, ingrained in America's consciousness since the Sept. 11 attacks and the ensuing war in Afghanistan.
The 19 al-Qaida members behind the hijackings that sent planes into the World Trade Center, the Pentagon and the Pennsylvania countryside plotted their attacks from Taliban-protected safe havens in Afghanistan.
The Afghan Taliban took over Afghanistan in 1996. United in Islamic ideology, they sheltered Osama bin Laden and his al-Qaida followers. Al-Qaida terrorist training camps flourished openly in the 1990s and the two groups shared weapons, financing and tactics.
In the aftermath of the Sept. 11 attacks, the Bush administration repeatedly linked al-Qaida and the Afghan Taliban in rhetoric and policy, pairing them in enemies' lists and economic penalties.
President Barack Obama and his advisers are debating whether U.S. policy should sever that linkage and target al-Qaida, which has appeared to have found new allies inside the Pakistani border.
Over the past 18 months, according to analysts and U.S. counterterrorism officials, al-Qaida leaders have deepened and solidified their relationship with Pakistan's Taliban and with other violent homegrown militant groups, including Jaish-e-Mohammed and Lashkar-e-Janghvi, that are based in the northeastern Punjab province.
Al-Qaida also has strong ties with the network run by Jalaluddin Haqqani and his son Siraj, who direct the fight against U.S. forces in eastern Afghanistan from the Waziristan tribal region in Pakistan.
Brown pointed to the Haqqani network operating in Pakistan's tribal areas as an example of militants linked to al-Qaida who have demonstrated a growth in technical innovation. Its increased use of roadside bombs and different types of suicide attacks, and the employment of other international jihadists are evidence of the al-Qaida influence, he said.
According to U.S. officials and analysts, al-Qaida leaders have provided training and resources to these groups in camps along the border.
The stronger ties are also evident, the analysts said, in suicide bombings and other violent battlefield tactics long known to be associated with al-Qaida that are showing up more frequently in attacks staged by those Pakistan-based groups.
Pakistan's Taliban have unloosed a spree of violence inside the country over the past year, attempting to take over the Swat Valley region before being ousted by Pakistan's army.
In recent weeks, the Pakistani Taliban, aided by other militants, have targeted military and government installations in suicide bombings aimed at forcing the government to back off from its recent push into South Waziristan, the border area where many militants are based. Despite those attacks, the offensive began last week.
At the same time, said Richard Barrett, coordinator of the monitoring team for the U.N.'s Al-Qaida and Taliban Sanctions Committee, said there are hints of fracture between al-Qaida and its longtime Afghan Taliban allies.
Barrett said that Afghan Taliban leaders, including the reclusive, one-eyed Mullah Omar, may have changed their once-approving view of al-Qaida. Barrett said the Afghan Taliban may worry about U.S. repercussions if they "are seen as very closely wedded to al-Qaida" and likely to allow that group to re-establish sanctuaries there.
While the Afghan Taliban share many of al-Qaida's violent goals, including the defeat of the Kabul government, Barrett said, they are more regionally focused and do not hold the same global jihadist views.
Some U.S. military and intelligence officials, however, warn against underestimating the relationship between al-Qaida and the Afghan Taliban.
While the Taliban and al-Qaida may have differences, senior counterterrorism officials say that al-Qaida still has strong historical ties to Mullah Omar and that is not likely to go away. The officials spoke on condition of anonymity to discuss intelligence.
Gen. Stanley McChrystal, the top U.S. commander in Afghanistan, is arguing for an additional 10,000 and 80,000 troops to mount a counterinsurgency campaign against the Afghan Taliban to stabilize the country and boost Afghan security forces.
But rising U.S. casualties, escalating violence and declining American support for the war have put political pressure on the White House to rethink that strategy. The counterproposal urged by Biden and others would maintain current troop levels and use special operations forces and targeted unmanned aircraft strikes against al-Qaida and other insurgents.
Recent U.S. government estimates put the number of Taliban fighters in Afghanistan at about 25,000, while analysts and other officials say there are only about 100 al-Qaida members in the country. Totals for al-Qaida in Pakistan are more difficult to pin down, but estimates are in the low hundreds, while Taliban there number also in the thousands.
Biden and others argue that if the aim is to prevent future attacks against the United States, then the goal must be to defeat al-Qaida.
Military analyst Frederick Kagan told Congress this past week that any move to defeat al-Qaida cannot be separated from efforts to defeat its allies and proxies. The Afghan Taliban may not be planning attacks terrorist against the United States now, but he said that, with continued association with al-Qaida, the Taliban eventually may pursue global jihad.
Bruce Hoffman, a counterterrorism expert at Georgetown University and a longtime government adviser, said al-Qaida continues to work with the Taliban and other insurgents on both sides of the border, providing resources and training to bolster their fight.
He and others argue that to narrowly focus the fight on al-Qaida leaders, particularly those targeted by drone strikes inside the Pakistan border, would be to oversimplify a complex enemy, and ultimately fail.