The Taliban has deepened its infiltration of Afghan institutions and sharpened its surveillance of Afghan and foreign troops as it seeks to exploit an edge in the information war that will help decide the fate of the insurgency.
Much of the Taliban's structure was destroyed or dispersed by the 2001 U.S.-led invasion, which forced the militant group from power. Midlevel commanders have been hit hard in recent months by Western forces, and NATO officials say the Pakistani-based leadership is plagued by infighting.
But as Afghanistan has floundered in recent years, the movement has rebounded, in part by refocusing on its age-old skill in exploiting tribal and family links, using foot messengers and keeping an eye on its enemies.
The Taliban uses the information it gathers to probe for openings for suicide bombers, to monitor the movements of Western and Afghan forces and to stymie efforts to improve public services that help the government build credibility with civilians.
But analysts also point to a key weakness: Even though a new generation of militants is more adept at employing the Internet, cellphones and social media, the Taliban's decentralized structure makes it difficult to synthesize information and act in a unified manner.
Western experts and the Taliban agree on the importance of the information war as the U.S. aims to withdraw by 2014. The militants' effort is based on an understanding that goes back to the Taliban's governing days under Mullah Mohammed Omar.
"Mullah Omar said the first power in Afghanistan is information," said a Western military official in Kabul, the Afghan capital, who is familiar with intelligence matters, citing former Taliban officials who knew the movement's longtime leader. "He who controls the information controls the will of the people."
Western forces and their Afghan allies conduct their own extensive intelligence operations. U.S. drones constantly circle the skies, and surveillance of electronic communication is ubiquitous. The Afghan government also has claimed some success in thwarting attacks.
But the Taliban is able to keep a presence, even in those parts of the country that are the most unfriendly to it. In ethnic Hazara and religiously Shiite Daikundi province, which for years was considered a haven from the Sunni Pashtun-dominated Taliban, the governor said he knew the militants were close by.
In "night letters" distributed to people's homes, the insurgents warned civilians not to contribute to community projects, and truckers not to do business with the government. "Anything that would happen in the local council or government, they would know about it within two or three hours," said Sultan Ali Oruzgani, a former governor of Daikundi. "In the area of my power, they had infiltrated the army, the local government and the parliament."
The militants have reached behind the high stone walls of Pul-i-Charki prison, which houses Taliban and Al Qaeda operatives, including some returned from the Guantanamo Bay prison in Cuba.
"There are people in uniform on the payroll," said an insider at the prison compound east of Kabul, who spoke on condition of anonymity for fear of putting himself in danger. "The black turban is always watching us."
The source, who has been inside Afghan detention centers for years, said Taliban sympathizers among the guards help detainees keep in touch with field contacts. Physicians, among the few outsiders with access to prisoners, also assist.
"Stuff gets brought in for them, all the means to communicate," said the insider. "They have wireless Internet. They distribute and analyze video clips of operations."
Experts and former officials point to evidence of widespread infiltration of the Afghan army and police.
"In terms of penetrating the Afghan security forces, they have had more and more success, using family ties and local resentments against foreigners," said Arturo Munoz, a former CIA analyst who now researches Afghanistan for the Rand Corp.
In one classified U.S. military field report published by WikiLeaks, a local police commander in Paktia province was quoted as saying that the Taliban in his area was led by a member of the local government who provided intelligence to both sides.
Another report said a commander of the Haqqani network was the son of a national police colonel. Often families place one son in the Taliban and another in the army to hedge their bets, said several analysts in Kabul.
"They know where the government isn't providing justice, so they provide courts. They know where the police are being predatory, so they provide an alternative," said Andrew Exum, a former special forces operative in Afghanistan who now is at the Center for a New American Security, a Washington think tank.
Meanwhile, local Taliban commanders keep a close watch on foreign troops.
"They have guys planted on mountaintops with binoculars," said Joshua Foust, an advisor to a U.S. Army program meant to help military officials understand local cultures. He recalled that the Taliban was watching every time troops entered or exited a base in Kandahar province.
"They know we listen to them watching us," he said. "They might even say things to trick us. Despite the lack of resources they have on hand, they're fairly sophisticated."
Analysts say that despite the Western-led military forces' ability to spy on the Taliban, the insurgents' use of electronic communications has intensified dramatically. As recently as 2008, the militants had banned the use of cellphones from 7 p.m. to 7 a.m., a period during which anti-Taliban raids frequently took place.
"They buy a phone card for $2 and give orders or send information," retired Gen. Fereydoun Ghiami said. "They say, 'My name is Fereydoun, son of such-and-such and from such-and-such village.' By the time you figure it out, the operation is over, and the SIM card thrown away."
Wahid Mujda, a pundit and writer who served in the Taliban's Foreign Ministry, said insurgent commanders who once considered use of computers sinful now embrace Facebook and email. Using email, the Taliban is often quick to publicize its version of an event. And the production quality of propaganda videos has improved dramatically.
But unlike many insurgent movements, the Taliban lacks a centralized structure or even a unified command. The Haqqani network, Gulbuddin Hekmatyar and Mullah Omar's Pakistani-based council all are part of it, and the leaders have little control over what local commanders do.
Senior commanders may be trying to assert themselves. "There are indications that there is a sort of head of intelligence," said a Western military official in Kabul familiar with Taliban intelligence capabilities.
According to information the North Atlantic Treaty Organization-led forces have gleaned, the Taliban's aim is as much to police its own organization as to collect intelligence. "They're trying to find out who's stealing what, and what's really going on within their organizations," said the official, who spoke on condition of anonymity because of the sensitive nature of his job.
And Western experts caution that, as broad as its network is, the Taliban also has other serious limitations. The militants don't have the wherewithal to listen in on American troops' radio transmissions. They have zero understanding of sophisticated communications or military-caliber encryption technologies.
"They probably have more eyes than ears," said Matt Pottinger, a former Marine intelligence officer now at the Council on Foreign Relations. "Ears are more powerful."