KORENGAL VALLEY, AFGHANISTAN -- It was as if the five years of almost ceaseless firefights and ambushes had been a misunderstanding -- a tragic, bloody misunderstanding.

More than 40 U.S. troops have been killed, and scores more wounded, in helicopter crashes, machine-gun attacks and grenade blasts in the Korengal Valley, a jagged sliver just six miles long and a half-mile wide. The Afghan death toll has been far higher, making the Korengal some of the bloodiest ground in all of Afghanistan, according to American and Afghan officials.

In the pre-dawn hours of Wednesday, the U.S. presence here came to an abrupt end.

A day earlier, Capt. Mark Moretti, the 28-year-old commander of American forces in the valley, walked two dozen Korengali elders around his base and told them that the United States was withdrawing. He showed the elders the battle-scarred barracks, a bullet-ridden crane, wheezing generators and a rubber bladder brimming with 6,000 gallons of fuel.

Moretti, the son of a West Point physics professor, and Shamshir Khan, a valley elder whose son had been jailed for killing two U.S. troops, sat together on a small wall near the base's helicopter pad. In keeping with local custom among friends, they held hands.

Moretti gently reminded Khan of the deal they had reached a few days earlier: If U.S. troops were allowed to leave peacefully, the Americans wouldn't destroy the base, the crane and the fuel. Khan assured him that the valley's fighters would honor the deal.

"I hope that when I am gone, you will do what is best for your valley and the villagers," an almost wistful Moretti said.

"I want you to travel safely to your home, to your family," the 86-year-old elder replied. He gazed at the officer through thick glasses that magnified rheumy brown eyes and beamed.

Over the previous week, hundreds of U.S. Army Rangers and Afghan commandos had pushed into the valley to control the high ground the enemy would need for a big attack on departing troops. Dozens of cargo helicopters hauled off equipment. By Wednesday morning, the last Americans were gone.

For U.S. commanders, the Korengal Valley offers a hard lesson in the limits of American power and goodwill in Afghanistan. The valley's extreme isolation, its axle-breaking terrain and its inhabitants' suspicion of outsiders made it a perfect spot to wage an insurgency against a Western army.

U.S. troops arrived here in 2005 to flush out al-Qaeda and Taliban fighters. They stayed on the theory that their presence drew insurgents away from areas where the U.S. role is more tolerated and there is a greater desire for development. The troops were, in essence, bullet magnets.

In 2010, a new set of commanders concluded that the United States had blundered into a blood feud with fierce and clannish villagers who wanted, above all, to be left alone. By this logic, subduing the Korengal wasn't worth the cost in American blood.

The retreat carries risks. Insurgents could use the Korengal as a haven to plan attacks in other parts of Afghanistan. The withdrawal could offer proof to other Afghans that U.S. troops can be forced out.

The American hope is that pulling out of the Korengal rectifies a mistake and that Moretti's troops can be put to better use stabilizing larger, less violent areas.

"You can't force the local populace to accept you in their valley," Moretti said. "You can't make them want to work with us."
'A waste of time'

On April 7, Moretti and about three dozen other soldiers set out on foot for the town of Aliabad, about one mile from the Korengal Outpost, the main U.S. base in the valley. Rumors of the American departure had begun spreading through the area, and intelligence reports suggested that insurgent commanders were planning a large-scale attack. Moretti was eager to find out what the valley's elders knew.

The troops walked down a dirt trail, scanning the ridgelines. About a half-mile from the U.S. outpost, a bomb exploded at their feet, spraying shrapnel, rock shards and dirt. Blood trickled from a 22-year-old soldier's blown eardrum, cutting a narrow path down his dirt-caked face.

"I can't hear a [expletive] thing," the soldier said.

Another soldier suffered what appeared to be a broken leg.

"If you have eyes on the triggerman, you are cleared to fire," Moretti screamed.

His troops blasted away at a lone figure running along the ridgeline on the other side of the valley. An attack helicopter fired a missile into an abandoned house where one of the soldiers thought he saw the triggerman.

The wounded were carried back to the base and evacuated by helicopter. Moretti and the rest of the patrol resumed their trek to Aliabad in search of Khan and his younger brother-in-law Zalwar Khan.

Later, Moretti and the elderly Afghans sat together on a small porch overlooking terraces of brilliant emerald winter wheat. Zalwar Khan's role as the primary interlocutor between the Americans and the insurgents gave him a small measure of status. He had used his relationship with the American commanders to seek humanitarian aid for hungry villagers and cash payments for goats killed by U.S. mortar shells.

But Moretti had been avoiding the Afghan as a way to pressure him into greater cooperation.

"You are the only American commander I have known who refuses to see me," Khan said in Pashto, his face just inches from Moretti's. "You are the only one who doesn't sit at the weekly shura. Why?"

"The shura is a waste of time," Moretti replied. "All we talk about is dead goats. In 10 months, the meetings haven't accomplished a single thing."

He and Khan argued in circles for the next 15 minutes about the violence in the valley before Moretti cut the conversation short.

"I know there are big plans for an attack on one of my bases," he said. "I want to hear about it." In exchange for information, Moretti promised to start meeting again with Khan.

Most of the Korengal's 4,000 to 5,000 residents live in stone houses that cling to the valley's steep walls. To survive, they grow wheat and log towering cedars in defiance of a government ban on timber exports. They speak their own language.

For most of the past five years, U.S. troops have exercised loose control over the first three miles of the valley. Beyond that mark, the insurgents have had free rein.

When he arrived in the Korengal in June, Moretti sent his troops into villages where there had been no regular American presence for a year. His plan was to drive the enemy back and persuade the elders to support a U.S.-funded effort to pave the sole road into the valley, a project that had stalled in 2007.

The road would connect the Korengal to the rest of eastern Afghanistan and, in theory, make it more governable. In September, as construction was set to begin, insurgents killed six guards hired by the contractor and took their weapons. The contractor quit.

Moretti's predecessors had spent countless hours trying to persuade Zalwar Khan to rally the locals to support the road project. Three years of prodding had produced virtually no progress. Moretti sensed that the real power in the valley lay with the men leading the insurgency.

He asked Khan to deliver a letter to a timber baron and insurgent leader known as Matin, who like many Afghans uses only one name. Long before Moretti's arrival in the valley, U.S. troops had killed several of Matin's family members in airstrikes, according to the Korengalis. In banning the timber trade, the Afghan government had deprived him of his sole means of income.

Instead he advised Moretti to write to Nasurallah, a colleague of Matin's. "It is our belief that you are the rightful leader of the Korengalis," the captain wrote. "You hold the power not only among the villagers but also among the fighters. If you want the valley to prosper all you have to do is talk with us and bring your fighters down from the mountains."

The letter offered Nasurallah two choices: development or death. "It is not our wish to kill your fellow Korengalis," Moretti continued. "But we are good at it and will continue to do it as long as you fight us."

Two days later, Moretti received a response. "If you surrender to the law of God then our war against you will end," Nasurallah wrote. "If you keep fighting for man's law then we will fight you until Doomsday."
A change of ambition

Shortly after Gen. Stanley A. McChrystal took over as the top U.S. and NATO commander in Afghanistan last summer, he flew into the Korengal to meet with Moretti. At the time, McChrystal was reluctant to pump any more troops into the stalemated fight. But he also was hesitant to leave because an American defeat in the Korengal would raise questions about U.S. will and embolden other insurgents, American officials said.

"Do you think you can turn the valley?" he asked Moretti, the son of one of his West Point classmates.

"I really believe we can make a difference," Moretti recalled telling him.

In the months since, Moretti and his commanders became increasingly convinced that the Korengalis' main ambition was to drive the Americans from the valley. They received training, money and weapons from backers in Pakistan and the Middle East. But the Korengalis' fight was local.

"I don't believe there are any hard-core Taliban in the valley," said Lt. Col. Brian Pearl, who oversees U.S. military operations in the Korengal and a half-dozen other valleys in eastern Afghanistan.

Last week McChrystal flew back into the valley. Moretti walked him through the plan to pull out his 154 troops. "Sir, I think we are looking forward to getting out of here," Moretti said. "I think leaving is the right thing to do."

Some of his soldiers were more blunt with the general. "This place is rough," said Pfc. Matthew Lunceford, who had a gash across his cheek from the bombing on the way to see the Khans. "It is freaking nuts."

Moretti's troops had learned from earlier units' experience about how to survive in the valley. They knew which ambush sites to avoid. They also patrolled areas that hadn't had a U.S. presence in years to keep the enemy off balance.

In 10 months, the unit lost only two soldiers: One sergeant committed suicide; the company's only combat fatality occurred in January when a platoon was ambushed while walking down an outdoor stairway near Aliabad.

Spec. Robert Donevski, a 19-year-old from Sun City, Ariz., jumped a fence and opened fire on the enemy so that his fellow soldiers could scramble to safety. As he was climbing back over the fence to join his squad, a bullet struck him in the head. He died at an Army field hospital.

Moretti mourned the losses. He also recognized that losing just two soldiers in 10 months in the Korengal was a victory.

"In this place, with all its violent history, that is our proudest achievement," he said.

The Korengal Valley in eastern Afghanistan was a transit route and occasional haven for insurgents, so U.S. commanders decided to drive out the enemy and turn the local villagers into allies. That was in 2005. By this week, after five years of intense combat that cost 42 American lives, U.S. troops had fought their way halfway down the steep-sided, heavily forested valley -- which is just six miles long.

That's five years and 42 lives for three miles of terrain. On Wednesday, the Pentagon announced that U.S. forces are withdrawing from the Korengal, leaving only a small outpost at the mouth of the valley. The Taliban will probably claim a victory over the "infidel" invaders, but the reality is that nobody "lost" the Korengal. The remote declivity doesn't fit into the Obama administration's new strategy of protecting the civilian population. A decision was made that the Korengal simply isn't worth winning.

This is almost certainly the right call. But I can't help worrying that the Korengal is not just a metaphor but a template for the whole war. When the day inevitably comes when we pack up and leave Afghanistan, what will we have accomplished?

"The Korengal Valley is sort of the Afghanistan of Afghanistan: too remote to conquer, too poor to intimidate, too autonomous to buy off," writes author Sebastian Junger. "The Soviets never made it past the mouth of the valley. . . . When the 10th Mountain rolled into the valley in 2006, they may well have been the first military force ever to reach its southern end. They were only down there a day."

Junger, author of "The Perfect Storm," made five one-month trips to the Korengal Valley in 2007 and 2008 as an embedded reporter with U.S. troops. He and photojournalist Tim Hetherington have produced a film, "Restrepo," which won the grand jury prize for best documentary at the Sundance Film Festival. A new book by Junger will be out next month, titled "War," that chronicles the experiences of a platoon of soldiers who fought, and watched their friends die, in the Korengal.

Junger's book offers no grandiose theory of how to combat terrorism. It is a gripping account of how modern warfare is experienced by those who do the fighting, and its focus is that of a laser, not a floodlight. He reaches just one grand conclusion about the nature of war: that in the final analysis, you kill the enemy not because of nationality or ideology, but because if you don't, the enemy might kill you.

"I think from the beginning of human history, squad by squad, skirmish by skirmish, that's all it's ever been about," Junger said Thursday in a telephone interview. "It's an issue of survival. I don't think you find politics on the battlefield."

He meant that you don't find geopolitics in a battle like the one waged for the Korengal Valley. But "War" is full of stories that prove the adage about all politics being local. In one incident, U.S. soldiers not-so-accidentally killed, and then ate, a cow that belonged to a villager. This necessitated a negotiation with tribal elders over compensation -- and at stake was whether the locals would help the Americans ambush the Taliban or vice versa.

I asked Junger about the reaction of the U.S. soldiers he had met in the Korengal to the decision to pull out. "For the guys I was with, it's a pretty painful thing," he said. But he added that there was another way to look at it -- that war is inherently a process of trial and error, that commanders always make mistakes, and that it is a good thing if America's military brass can recognize that they have taken the wrong path and make the necessary adjustment.

But I can't help but worry that a larger mistake is being made. President Obama soon will have tripled the number of U.S. troops in Afghanistan. The new strategy of focusing on the populated heartland means withdrawing from remote outposts such as the Korengal, but our allies in Pakistan fear that this makes the border more permeable by Taliban and al-Qaeda fighters. President Hamid Karzai, our ally in the project of nation-building in Afghanistan, is a leader who bitterly denounces the presence of U.S. and other foreign troops and whose government is universally recognized as corrupt.

How many more will die before we leave the country? And what will we have accomplished?