The villagers said they just wanted to be left alone. They claimed they had asked the Taliban to stay away, and wished the Americans would do the same.

But now the Americans were back, determined to stop the Taliban from passing through the village to attack U.S. targets. And shortly afterward the gunfire from the hills above served notice that the Taliban had no intention of leaving.

What unfolded Tuesday would highlight the tug of war being waged for the loyalties of one village in eastern Afghanistan.

The story had begun with a clinic, built here with U.S. funds to demonstrate to Afghans that they have more to gain from the Americans than from the Taliban.

Last spring the Taliban blew it up. But the Americans kept coming back. Their previous visit was three months ago, and now it was time to put in another appearance.

The platoon of a couple dozen soldiers, part of the 2nd Battalion, 12th Infantry Regiment, 4th Brigade Combat Team, 4th Infantry Division, left their outpost before sunrise. They walked three miles in a riverbed over sand and man-sized boulders to reach the heap of concrete and twisted iron that used to be the clinic. There they met the village elders, who escorted them to a large shade tree in the center of Qatar Kala.

The platoon commander, a 6-foot-5 lieutenant named Thomas Goodman, sat among the villagers, took off his helmet and sunglasses and explained why they had come.

Anti-American fighters had been passing through Qatar Kala westward to attack U.S. outposts along the nearby Pech River, said Goodman.

"Unless this is stopped, you have to understand that you'll be getting regular visits from coalition forces," he said.

The elders were unswayed. "We ask you not to come here," one said. "It is better for us, and better for you."

The atmosphere was tense. An attack was expected. Back at the ruined clinic, the squad's Afghan translator had asked if this journalist had a mobile phone. "You should call your loved ones now to say that you care about them. I'm telling you, the walk home from here is not a joke," he said with a nervous smile.

As they left Qatar Kala, with U.S. helicopters buzzing overhead, Goodman split his men into two squads, one along the riverbed and one in an irrigation canal on higher ground.

About 500 yards outside the village gunfire whistled down from the eastern mountainside.

Soldiers dived stomach-down. The rushing canal water soaked boots and uniforms and jammed at least one weapon as soldiers got up to shoot back.

From the riverbed, the second squad fired volleys over the men in the canal. U.S. helicopters shot rockets and bursts of gunfire onto visible Taliban muzzle flashes. Nearby bases launched mortar shells and artillery barrages, and huge plumes of smoke erupted on the ridge line. Taliban fighters began moving down the hillsides. The pinned-down U.S. soldiers shot back.

Two at a time, soldiers bounded across open fields and behind the farm terraces for cover, heading for the river along which they had come. Several leaped down the steep river bank and slid behind the huge boulders to catch their breath. Gunfire popped from the opposite side of the river.

The Americans were being squeezed from both directions. The Taliban moved closer. Ammunition was running low.

A helicopter hovered by the river bank and a medical stretcher slid out, laden with grenades and machine gun bullets.

Helicopters continued to hammer the Taliban but repeatedly had to return to a nearby base to rearm and refuel.

Gradually the soldiers made it to safety. The firefight had lasted about four hours. The entire operation, from dawn until the return to base, went on for about seven hours.

The soldiers were met in front of the bazaar of a friendly village by troops in military vehicles who gave them bottled water. They were caked in drying mud but with no casualties except for two sprained ankles.

Then they headed back to their outpost, which is named Honaker Miracle after two U.S. infantrymen, Sgt. 1st Class Christopher Honaker and Pfc. Joseph Miracle, killed in Afghanistan in 2007.

The platoon was later told by its company command that reports suggested up to five Taliban were killed in Tuesday's fighting.