PUL-I-KHUMRI, Afghanistan — Abdul Rehman Rahimi, the police chief of Baghlan province in northern Afghanistan, was just saying that the Taliban threat was under control when his counter-terrorism chief walked in, smirking with self-satisfaction and holding up a homemade detonator and a tangle of charred electrical wire tipped by a blasting cap.
"They tried to set this off as I was digging it up," Col. Ahmad Jan said. "The wire began burning — see, it still smells — but I cut it in time."
In the past year, Jan has defused about 650 such bombs. Many of them were planted along the two key supply routes of the U.S.-led International Security Assistance Force.
While the U.S. military has focused on the Taliban's southern strongholds, the militants and allied groups have been gaining ground in the north. The difficulties in Baghlan are emblematic of the uphill battle the United States and its allies face in trying to stabilize Afghanistan enough to begin drawing down troops next year.
The smaller NATO units that operate in the north are under restrictions driven by opposition to the war at home.
"Insurgency is a naturally lazy animal," said an ISAF intelligence official who spoke only on the condition of anonymity because he wasn't authorized to speak publicly. "Like water and electricity, it goes wherever there are the least amounts of resistance."
U.S. Army Gen. David Petraeus, the commander of the American-led force in Afghanistan, predicted last week that "we can be increasingly effective" in the north with intensified counterinsurgency efforts, including stepped-up training of Afghan security forces.
The insurgents' numbers, however, are growing. Chaos, fraud, corruption and joblessness help their recruiting.
The province is engulfed by ethnic tensions, warlordism, corruption, poverty and crime.
Local officials blame some of it on a U.S.-backed auxiliary police group that the Afghan intelligence service recruited from among former insurgents. Petraeus has touted the group as "a community watch with AK-47s."
Massive fraud in last month's parliamentary elections, meanwhile, is fueling anger in the garbage-strewn bazaars and neighborhoods of dilapidated homes and open sewers of the provincial center, Pul-i-Khumri.
"People ask the government for security. Day by day it has gotten worse. The cost of goods has gotten higher. The government has done nothing for the people," said Abdul Basir, 35, a shopkeeper who trades in bright, sequined women's garments.
Some in Baghlan pointed out that the U.S. had been in the country for nine years, and they wondered whether it wants the war to continue for its own devious purposes.
Baghlan is perhaps the most strategic of Afghanistan's 14 northern provinces. Home to an ethnically mixed population estimated at 763,000, it commands one end of the Salang Pass, the only passage through the Hindu Kush mountains, linking Kabul with the country's northern tier and neighboring Central Asia.
The insurgents have expanded north toward the pass. They control villages that border Pul-i-Khumri, and they attacked the town during the Sept. 18 parliamentary election.
"The Taliban are just over there," police Sgt. Mohammad Sharif said, pointing to fields and orchards from his outpost atop the rubble of a ruined factory outside the center of town. "On Election Day, they were on the hills above the city. We were fighting here for two days and two nights."
Other extremist groups also have stepped up operations, Jan and other Afghan and Western officials said. They've reported clashes between the Taliban and the smaller Hezb Islami and infiltrations of al Qaida-linked extremists from Pakistan, Uzbekistan, Tajikistan and Russia's restive republic of Chechnya.
"I have met three Pakistanis, and treated a Kazakh and a Chechen," said Khalil Naramgoi, a surgeon and part-time journalist who's long known the local Taliban commanders through his visits to tend the sick in their villages.
Small numbers of Uzbeks, Tajiks and other minorities have begun joining the Taliban, whose ranks had been filled by Pashtuns, the ethnic group that dominates Afghanistan's south and east, several officials and residents said.
Mohammad Younis, the provincial director of Mercy Corps, an U.S.-based aid organization, said that one way the Taliban had won over minority fighters was by taking their side in land disputes or other feuds with rival ethnic groups.
Data compiled by Indicium Consulting, a firm that analyzes security trends, chart a slow rise in violence in Baghlan since the beginning of the year and a spike for the week of the parliamentary election.
U.S. special forces are being deployed in Baghlan to mold former insurgents into auxiliary police. Residents and officials disparage these largely illiterate tribesmen as armed rabble.
"When they enter an area, they are doing their cruel actions. Some people prefer the Taliban to the arbaki," Younis said, referring to the tribal militia.
The militia, made up of former Hezb Islami members, was mauled several weeks ago in a firefight with the Taliban, local officials and several members said. Two of its men were killed.
Three others died when they were mistakenly bombed by U.S. aircraft, even though American troops were with them, as they were trying to withdraw,.
"We were actually surrounded by the Taliban for three days and three nights," said Fazul Rehman, a member of the unit, who was loitering with three other fighters, assault rifles over their shoulders, outside the Pul-i-Khumri police headquarters. "The police wouldn't do anything."
The militia, however, is only part of Baghlan's problems. Its thorniest one may be beyond the ability of the United States and its allies to fix.
Successive administrations — there have been nine governors in as many years — have failed to stem the growing anarchy. Ethnic rivalries, inept and corrupt officials, and Taliban infiltration have infected the provincial government, and it's failed to rein in the power barons, gangsters and their minions.
Naramgoi said that every month he treated two to three victims of crimes that went unpunished because money was paid to authorities to hush them up.
"A 9-year-old boy was raped by a government official, and nothing was done. I treated him. Now his father is in the Taliban," said Naramgoi, who was arrested and held without charges in 2008 and 2009 for writing newspaper articles critical of the government.
Police Chief Rahimi, a Pashtun transferred from Kabul, said he was forced to spend most of his time and energy on suppressing ethnic tensions over the domination of the police by Tajiks, whose leaders used the 2001 U.S.-led invasion to seize control of the provincial bureaucracy.
"If I try to remove an officer from a post, the whole of Baghlan starts to shake, and I am afraid of protests even though the individual has committed crimes," he said.
Baghlan Gov. Abdul Majid said local criminals and tribal chiefs were taking their cues from the corruption and immunity from justice of the ethnic warlords who surrounded President Hamid Karzai.
"The governance in Afghanistan that we have today cannot bring security. Day by day, the base of the government is growing weaker," Majid said. "We have here in Afghanistan the mafia of power and authority."
MORE FROM MCCLATCHY
Follow national security developments at McClatchy's Nukes & Spooks
Follow Afghanistan news at McClatchy's Checkpoint Kabul