PETER PARKS/AFP/Getty ImagesIn this photograph taken on March 30, 2011, two US army Chinook helicopters land at Kandahar airfield in southern Afghanistan. A helicopter crashed Saturday, killing 31 U.S. special operation troops.

KABUL, Afghanistan — A military helicopter crashed in eastern Afghanistan, killing 31 U.S. special operation troops and seven Afghan commandos, the country's president said today. An American official said it was apparently shot down, in the deadliest single incident for American forces in the decade-long war.

The Taliban claimed they downed the helicopter with rocket fire while it was taking part in a raid on a house where insurgents were gathered in the province of Wardak late Friday. It said wreckage of the craft was strewn at the scene.

NATO confirmed the overnight crash took place and that there "was enemy activity in the area." But it said it was still investigating the cause and conducting a recovery operation at the site. It did not release details or casualty figures.

"We are in the process of accessing the facts," said U.S. Air Force Capt. Justin Brockhoff, a NATO spokesman.

But a senior U.S. administration official in Washington said it was apparently shot down by insurgents. The official spoke on condition of anonymity because the crash is still being investigated.

President Barack Obama mourned the deaths of the American troops, saying in a statement that the crash serves as a reminder of the "extraordinary sacrifices" being made by the U.S. military and its families. He said he also mourned "the Afghans who died alongside our troops."

The death toll would surpass the worst single day loss of life for the U.S.-led coalition in Afghanistan since the war began in 2001 — the June 28, 2005 downing of a military helicopter in eastern Kunar province. In that incident, 16 Navy SEALs and Army special operations troops were killed when their craft was shot down while on a mission to rescue four SEALs under attack by the Taliban. Three of the SEALs being rescued were also killed and the fourth wounded. It was the highest one-day death toll for the Navy Special Warfare personnel since World War II.

With its steep mountain ranges, providing shelter for militants armed with rocket-propelled grenade launchers, eastern Afghanistan is hazardous terrain for military aircraft. Large, slow-moving air transport carriers like the CH-47 Chinook are particularly vulnerable, often forced to ease their way through sheer valleys where insurgents can achieve more level lines of fire from mountainsides.

Afghan President Hamid Karzai on Saturday gave the first public word of the new crash, saying in a statement that "a NATO helicopter crashed last night in Wardak province" and that 31 American special operations troops were killed. He expressed his condolences to President Barack Obama.

The helicopter was a twin-rotor Chinook, said an official at NATO headquarters in Brussels. The official, who spoke on condition of anonymity, said he was receiving his information from an Afghan officer in Kabul.

The crash took place in the Sayd Abad district of Wardak province, said a provincial government spokesman, Shahidullah Shahid. The volatile region borders the province of Kabul where the Afghan capital is located and is known for its strong Taliban presence.

Taliban spokesman Zabiullah Mujahid said in a statement that Taliban fighters downed the helicopter during a "heavy raid" in Sayd Abad. He said NATO attacked a house in Sayd Abad where insurgent fighters were gathering Friday night. During the battle, the fighters shot down the helicopter, killing 31 Americans and seven Afghans, he said, adding that eight insurgents were killed in the fight.

There have been at least 17 coalition and Afghan aircraft crashes in Afghanistan this year.

Most of the crashes were attributed to pilot errors, weather conditions or mechanical failures. However, the coalition has confirmed that at least one CH-47F Chinook helicopter was hit by a rocket propelled grenade on July 25. Two coalition crew members were injured in that attack.

Meanwhile, in the southern Helmand province, an Afghan government official said Saturday that NATO troops attacked a house and inadvertently killed eight members of a family, including women and children.

NATO said that Taliban fighters fired rocket propelled grenades and small arms fire at coalition troops during a patrol Friday in the Nad Ali district.

"Coalition forces responded with small arms fire and as the incident continued, an air strike was employed against the insurgent position," said Brockhoff. He added that NATO sent a delegation to meet with local leaders and investigate the incident.

Nad Ali district police chief Shadi Khan said civilians died in the bombardment but that it was unknown how many insurgents were killed.

Helmand, a Taliban stronghold, is the deadliest province in Afghanistan for international troops.

NATO has come under harsh criticism in the past for accidentally killing civilians during operations against suspected insurgents. However, civilian death tallies by the United Nations show the insurgency is responsible for most war casualties involving noncombatants.

In south Afghanistan, NATO said two coalition service member were killed, one on Friday and another on Saturday. The international alliance did not release further details.

With the casualties from the helicopter crash, the deaths bring to 365 the number of coalition troops killed this year in Afghanistan and 42 this month.