Afghanistan's President Karzai attends the funeral ceremony for his brother Karzai at presidential palace in Kabul
Afghanistan's President Hamid Karzai attends the funeral ceremony for his younger brother Ahmad Wali Karzai at the presidential palace in Kabul July 15, 2011. Ahmad Wali Karzai, the younger half-brother of Afghan President Hamid Karzai and most powerful man in southern Afghanistan, was killed by an assassin. Reuters

A NATO helicopter crashed during a battle with the Taliban in Afghanistan, killing 31 U.S. soldiers and 7 Afghans, the Afghan president said on Saturday, a devastating toll and easily the worst single incident for foreign troops in 10 years of war.

A brief statement from the presidential palace said the troop-carrying Chinook helicopter had crashed in Syedabad in central Maidan Wardak province, just to the west of the capital, Kabul, and identified the Americans as special forces troops.

The Taliban quickly claimed to have shot down the helicopter during a firefight, although the Islamist militant group often exaggerates incidents involving foreign troops or Afghan government targets. They also said eight insurgents had been killed in torrid fighting.

"They wanted to attack our muhahideen who were in a house, but our mujahideen resisted and destroyed a helicopter with a RPG (rocket-propelled grenade) rocket," Taliban spokesman Zabihullah Mujahid said by telephone from an undisclosed location.

"Eight mujahideen were martyred and 38 Americans were killed and today they (U.S. soldiers) carried away parts of their plane and shattered pieces of their bodies."

The NATO-led International Security Assistance Force (ISAF) earlier confirmed that a helicopter had crashed but gave no information about the possible cause or casualties.

Afghan President Hamid Karzai "shared his deep sorrow and sadness" with counterpart Barack Obama and the families of the U.S. and Afghan victims, the palace statement said.

Afghanistan's Defense Ministry spokesman, Zaher Azimy, also said the helicopter had crashed. He said the Afghans killed had also been from a commando unit.

"The incident is under investigation right now as this helicopter belongs to international forces," Azimy told Reuters television. "Obviously they will provide details of the crash and the reason."

The high casualties come only two weeks after the start of a gradual process of handing security responsibility from foreign forces to Afghan troops and police, and at a time of growing unease about the increasingly unpopular and costly war.

That process is due to end with all foreign combat troops leaving Afghanistan by the end of 2014, but some U.S. lawmakers have already questioned whether that handover is fast enough.

Incidents with heavy death tolls are sure to raise even more questions about the transition process and how much longer foreign troops should stay.

The crash was by far the worst incident of the war for foreign troops and easily surpassed the worst incidents of battlefield losses.

In April 2005, another CH-47 Chinook helicopter crashed, killing 15 U.S. servicemen and three civilian contractors. Another Chinook crash in June the same year killed 17 U.S. troops.

WORRYING

U.S. and other NATO commanders have claimed success in reversing the momentum of a growing insurgency in the Taliban heartland in the south, although insurgents have shown a worrying ability to adapt their tactics and mount major attacks in other areas.

Those gains, however, have come at a price, with 711 foreign troops killed in Afghanistan in 2010, easily the deadliest year of the war for all concerned since the Taliban were toppled by U.S.-backed foreign troops in late 2001.

The crash in Maidan Wardak means that at least 374 foreign troops have been killed so far in 2011, more than two-thirds of them American, according to independent monitor www.icasualties.com and figures kept by Reuters.

Neither ISAF nor the U.S. military in Afghanistan confirmed whether there had been any casualties in the crash despite repeated telephone calls, much less any nationalities that might have been involved.

The majority of foreign troops in Wardak, which comes under ISAF's eastern regional command, are American.

Despite the alarming military toll, ordinary Afghan civilians have continued to bear the brunt of the war, with civilian casualties also hitting record levels in the first six months of this year, according to U.N. figures.

Earlier on Saturday, Afghan police said a NATO air strike killed eight civilians in southern Helmand province on Friday.

ISAF confirmed there had been an air strike in Helmand's Nad Ali district and said it was investigating whether civilians had been present at the time.

Civilian casualties caused by foreign troops hunting Taliban fighters and other insurgents have long been a major source of friction between Kabul and its Western backers.

Nad Ali district police chief Shidi Khan said the air strike was called in after insurgents attacked ISAF troops in the area.

The victims of Friday's air strike in Helmand were members of a family that had fled fighting in neighbouring Uruzgan province, police said.

ISAF said the civilians may have been held hostage by the insurgents.

The most contentious of the first seven areas to be handed over was the Helmand provincial capital of Lashkar Gah.

Helmand province has been the site of some of the most vicious fighting of the war. Far more foreign troops have died there than in any other province and there are still several Helmand districts dominated by the Taliban.

In the past month, insurgents have carried out a string of destabilising assassinations of high-profile southern leaders, including president Karzai's half brother, and several large attacks killing police and civilians.

A U.N. report last month said 1,462 civilians were killed in conflict-related incidents in the first six months of 2011, up 15 percent on the first half of 2010. It blamed insurgents for 80 percent of those deaths.