On a rainy Friday evening in early August, six Taliban fighters attacked a police post in a village in Buner, a quiet farming valley just outside Pakistan's lawless tribal region. The militants tied up eight policemen and lay them on the floor, and according to local accounts, the youngest member of the gang, a 14-year-old, shot the captives on orders from his boss. The fighters stole uniforms and weapons and fled into the mountains. Almost instantly, the people of Buner, armed with rifles, daggers and pistols, formed a posse, and after five days they cornered and killed their quarry. A video made on a cellphone showed the six militants lying in the dirt, blood oozing from their wounds. The stand at Buner has entered the lore of Pakistan's war against the militants as a dramatic example of ordinary citizens' determination to draw a line against the militants. But it says as much about the shortcomings of Pakistan's increasingly overwhelmed police forces and the pell-mell nature of the efforts to stop the militants, who week by week seem to seep deeper into Pakistan from their tribal strongholds. Since the events in Buner, the inspector general of the police in the North-West Frontier Province, Malik Naveed Khan, has encouraged citizens in other towns and villages in his realm to form posses of their own. The hope is that determination itself will deter Taliban encroachment, building on the August victory with one phalanx after another of committed citizens. But the strategy is also a sign of his desperation. "We are laying down our lives," Inspector General Khan said in an interview in October. "By the hundreds the police are being targeted and killed." He has had to lower recruitment standards to fill out the ranks, he said, "because this is war." Even so, he has supplemented his force with what he said were some 15,000 "special police" " citizens whom he cannot pay, but whom he is willing to arm. "Any community which helps us, we give them weapons," Inspector General Khan said. The army was of no use here. "There is no other way," Inspector General Khan warned. "Pure military action would create a lot of devastation, to the extent that people would turn against the government." Indeed, after the Taliban were cornered, a new peace committee composed of elders and politicians passed a resolution declaring Buner a zone free of both the army and the Taliban. The local police chief in the Buner district, Zubair Shah, a rising star of the Pakistani police force, acknowledged the challenges of confronting a Taliban threat that is more deeply ensconced in communities all over Pakistan than had been thought. He is trying to tamp down the Taliban with a police force that is grossly underpaid and frequently overmatched by better armed militants. Currently, the police officers in Buner earn about one-quarter the monthly salary that the Taliban are offering, Mr. Shah said. Moreover, given that the police have become a primary target of the militants, it is hardly surprising that morale has plummeted. "The people are more motivated than the police," he said. In the tribal areas to the west of the Buner district, the Pakistani Army is now encouraging tribal militias, known as lashkars, as a backup force against the Taliban. Such militias have a long tradition in tribal society. But even there, they have met with little success in the current conflict. By contrast, posses like the one in Buner have not been tried before in the settled parts of Pakistan outside the tribal areas, Inspector General Khan said. They have in any case become a necessary tool to help preserve the peace. The citizens of Buner, interviewed in late October after the police arranged an escort to the area, where security is still sketchy, said they had taken matters into their own hands to keep not only the militants at bay, but the army as well. In areas where the army has had to confront the militants frontally, fighting has ensued on the scale of a civil war, displacing tens of thousands of people. If citizens' militias sound like civil war already, that is precisely what the people of Buner say they are hoping to avoid. Such wrenching violence has been the fate already of the neighboring Swat Valley, and of nearby Bajaur, an area of the tribal region, where the army and militants have been locked in heavy fighting. Civilian casualties are high. The task of pushing back the Taliban is taking far longer than the army had anticipated. In Swat, the army has been unable to stop the burning of more than 100 girls schools or the murders of politicians and their families. About one-third of the police force has deserted in Swat, and some of the deserters have joined the Taliban, even as trainers, according to senior police officials. In Bajaur, more than 200,000 people have fled, becoming refugees in appalling conditions in makeshift camps. The villagers in Buner say they would prefer to handle the Taliban on their own, rather than have the heavy hand of the army come and do it for them. They did it with gusto, later lining up the bodies of their Taliban victims at a hospital like trophies so citizens could take a closer look. "We don't want happening here, what is happening around us," said Mohammed Zada, a retired bank manager, and a driving force behind the peace council. "The people are very unified so the Taliban failed. We are dead set against the army, too."While the resolve of local residents is heartening, Mr. Shah, an expert in counterterrorism, understands better than most Pakistanis what kind of threat he is up against. He has taught police investigative work with the United Nations in Bosnia and was selected by the United States Consulate in Peshawar for a monthlong leadership program in the United States. He recently spent a year in Australia studying transnational terrorism. As in many areas of Pakistan " from Karachi to Islamabad, and from rural districts in the north to the cultural capital, Lahore " the Taliban have sympathizers and workers in Buner who lie low in sleeper cells that can be easily activated, Mr. Shah said. Soon after the citizen mob killed the six Taliban, he said, undercover work led police officers to a house where they found a suicide vest packed with 20 pounds of explosives and 15 pounds of ball bearings. That discovery led to a potentially more lethal find: a full kit of ingredients for major explosions. In a house near his police headquarters, investigators found more than 500 pounds of explosives, a cache of 30 detonators, 10 remote-control devices, dozens of battery cells, a police uniform and a motorcycle, Mr. Shah said. Worryingly, he said, the explosives had been methodically delivered into Buner over time in small parcels by motorbike. One of the men arrested in the case had been friendly with the police, a shopkeeper who prayed at the same mosque as the police. Many of the villagers in Buner had relatives working abroad " in Malaysia, in Dubai and as taxi drivers in Arlington, Va. " who sent remittances home. The relative wealth and a longstanding social cohesion had helped to fortify the community and keep the Taliban at bay. Under these circumstances, the police chief said, people power was his best bet. "If the militants enter Buner," he said, "all you need to do is go to the mosque loudspeakers and shout, and people will be mobilized."