The Taliban uses its intelligence skills to probe for weak spots that leave an opening for suicide bombers, to monitor Western and Afghan forces and to stymie efforts to improve public services.

Reporting from Kabul, Afghanistan — 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.