NANGALAM, Afghanistan – The Americans arrived under cover of night, the static electricity from their helicopter blades casting halos of blue in the pitch black.

It was their first return to the Pech Valley — a rugged swath of eastern Afghanistan so violent they nicknamed it the Valley of Death — since the U.S. military abruptly ended an offensive against the Taliban there in 2011 after taking heavy casualties.

But the Americans, from the 1st Battalion of the 327th Infantry, had not come back to fight. Instead, their visit this summer was a chance to witness something unthinkable two years ago: the Afghan forces they had left in charge of the valley have not just stood — they have had an effect. The main road leading in the Pech is now drivable, and residents said they felt safer than they had in years.

"Man, you couldn't walk this road without getting lit up," said Staff Sgt. Benjamin Griffiths, amazed as he and about a dozen soldiers surveyed one area the day after their arrival.

No one is exactly sure how the Afghan forces have managed to make some gains that eluded the Americans for so many years. But it presents a sketch portrait of what Afghan-led security might look like after the international military coalition is gone.

Interviews with U.S. and Afghan officials paint the progress as an amalgam of many things: the absence of foreign troops as an irritant, a weakened Taliban and an improved Afghan army. Officials also noted the beginning of de facto agreements in some areas between Afghan soldiers and militants — not a particularly positive sign, but still an indication of how the battle might change when it is Afghan fighting Afghan.

The insurgents long promised that if Americans left, the violence would subside. The thinking went like this: Foreign fighters drawn to Afghanistan would lose interest, and locals who were not so much pro-Taliban as anti-outsider would ease their militancy.

That seems to mostly be the case in the Pech now; locals say the insurgents have been more reluctant to attack fellow Muslims, though they are still far from docile. "When Americans were here and were driving around or patrolling the area, nobody looked at them as friends or liberators," said Hajji Yar Mohammed, a tribal elder in nearby Manogai district. "Everyone in the villages was trying to fight them for the sake of jihad."