Thirty-one US Special Forces and seven local troops were killed when the Taliban shot down their helicopter, officials said Saturday, in what was the deadliest single incident for foreign soldiers since the war began in 2001.
The Chinook helicopter was downed late Friday during an anti-Taliban operation in an insurgent-strong district of the eastern province of Wardak, southwest of the Afghan capital Kabul.
Although Western and Afghan officials said they were still trying to assess exactly what happened, an eyewitness claimed it was struck during a firefight.
The Taliban claimed responsibility, saying it had shot the helicopter down.
The death toll was given in a statement issued by Afghan President Hamid Karzai's office and was not immediately confirmed by the NATO-led International Security Assistance Force (ISAF).
"The president of the Islamic Republic of Afghanistan Hamid Karzai expressed condolences over a NATO helicopter crash and the deaths of 31 members of US Special Forces," the statement said.
It added that seven Afghans were also killed in the crash, who the country's defence ministry said were members of a special forces unit.
"The president of the Islamic Republic of Afghanistan expresses his sympathy and deep condolences to US President Barack Obama and the families of the victims," the statement said.
The previous worst incident saw 16 American soldiers killed on 28 June 2005 when a Taliban rocket hit their Chinook in the eastern province of Kunar.
One man who said he saw Friday's shootdown, Mohammad Saber, told AFP that the helicopter plummeted during an operation in his village.
"At around 10:00pm last night (17:30 GMT), we heard helicopters flying over us," he said. "We were at home. We saw one of the helicopters land on the roof of a house of a Taliban commander, then shooting started.
"The helicopter later took off but soon after taking off it went down and crashed. There were other helicopters flying as well."
Wardak provincial spokesman Shahidullah Shahid said the crash came during a late-night operation against Taliban insurgents who have been waging war on the government since 2001.
"The joint forces (foreign and Afghan) conducted an operation against the Taliban in Sayd Abad district last night," he said. "Eight insurgents were killed. A coalition helicopter that was firing on insurgents at the time crashed. We're not sure if this happened due to insurgent fire or no,t but there were some casualties of foreign troops due to the crash."
A spokesman for ISAF, the foreign military force in Afghanistan, said they would issue a statement "at an appropriate moment".
Taliban spokesman Zabiullah Mujahid said the insurgent group was responsible for shooting down the helicopter, which he said was an American Chinook, and acknowledged that eight insurgents had been killed.
Chinooks are used for transporting large numbers of troops and supplies around in the warzone of Afghanistan.
There are currently around 140,000 foreign troops in Afghanistan, around 100,000 of them US troops, fighting as part of the international force that has been in the country for almost 10 years.
Some troop withdrawals have already begun as part of a process due to see all foreign combat forces leave the country by the end of 2014.
However, the Taliban are still waging a bloody insurgency in the country. In recent weeks, a string of high-profile figures close to Karzai have been assassinated.
In June, the UN said the number of security incidents between March and June was up over 50 per cent on the same period last year.