The police convoy was returning from a mission to free relatives of a slain tribal elder who had been kidnapped, when it was surprised by dozens of Taliban fighters, the officials said.

The ambush was part of clashes spread over two days that claimed the lives of an estimated 70 Taliban fighters, Col. Mohamed Masoum Hashimi, the deputy police chief of Nangarhar Province, said Friday.

The violence started Wednesday afternoon when Taliban fighters killed a tribal elder, Malik Wardak, at his home in the Sherzad district of the province. The insurgents apparently killed Mr. Wardak because one of his sons is a member of the Afghan Local Police, a force created to combat the Taliban at a local level.

Seeing their elder gunned down in broad daylight, Mr. Wardak's family members fought back, killing several Taliban fighters, including a commander, which prompted the Taliban to call in reinforcements, according to Ahmad Mushtaq, a villager and witness. Once they regained control, the furious insurgents beheaded the relative of Mr. Wardak who had launched the counterattack, Mr. Mushtaq said.

Word of the fighting spread quickly, drawing the attention of Afghan security forces, who dispatched soldiers and police officers to take on the Taliban. Mr. Wardak had close ties to the powerful Nangarhar governor, Gul Agha Sherzai.

The Taliban dug in, holding Mr. Wardak's relatives captive as the fight raged through the night, Afghan officials said. By early Thursday, the Afghan forces seemed to have secured control, officials said, safeguarding the family members in the district center. They said they had killed nearly a dozen insurgents while suffering no losses themselves.

But the insurgents were not through. As the remainder of the Afghan forces made their way back to the district center, insurgents staged two ambushes, police officials said. More fighting erupted along the road, prompting the government to call in a battery of Afghan reinforcements, including the Afghan Border Police, the Quick Reaction Force, the Afghan Local Police, and more army soldiers and national police officers.

The fight continued through Thursday until about 5 p.m., when the Afghan forces broke through the ambush, leaving the charred remains of vehicles smoldering on the road and almost two dozen of their colleagues dead. Afghan officials said that the attack resulted in the death of more than 60 insurgents.

The Taliban offered a narrative that resembled the government's in scale, if far more favorable to their side. In a statement, the insurgents claimed to have killed 84 soldiers and police officers, captured more than a dozen Ford Ranger vehicles and seized machine guns, rockets and radios. By their estimate, only five Taliban fighters were killed in the attacks.

The bruising battle was relayed to the news media late Friday, the middle of the Afghan weekend. Some details could not be confirmed, and numbers, typically inflated by both sides, are difficult to verify. The International Security Assistance Force, as the NATO-led military coalition here is called, referred all questions to the Afghans.

Still, the violence offered a frightening reminder of the insurgency's strength in a province just east of Kabul. It also displayed the resilience of the Afghan forces in the face of heavy casualties.

The Afghans have been active in the area recently battling a growing insurgency in the Hezerak district of Nangarhar and the Azra district of Logar Province, which both border the Sherzad district, where the tribal elder was killed. Those operations have encouraged coalition military officials, as the Afghans are forced to take the lead in security across the country.

For one of the first times in recent history, the Afghans used airplane transports in the Hezerak mission. They also conducted their own medical evacuations using helicopters during the Azra operation.

The summer has been busy for the Afghans, with coalition troops in many parts of the country seldom leaving their bases to participate in fighting. While coalition casualties have occurred throughout the summer, the numbers are infinitesimal compared with the thousands of Afghans who have died this year.

A question for many is how long the Afghan security forces can endure such high casualty rates before they begin to affect enlistment.

Khalid Alokozai contributed reporting from Nangarhar Province, Afghanistan.