The heavy loss shows that clandestine tactics carry huge risks despite the huge success of the SEAL mission that killed Osama bin Laden more than three months ago. Most of the SEALs who died Saturday were from the same unit that killed bin Laden, although none of the men took part in that mission.
The U.S.-led coalition plans to rely more on special operations missions as it reduces the overall number of combat troops by the end of 2014.
There were conflicting accounts late Sunday as to whether the SEAL team had subdued the attackers who had pinned down the Rangers and were departing, or whether they were hit as they tried to land. One official said they had accomplished their mission, but another said the aircraft, a Chinook helicopter, was hit as it approached.
Both officials spoke on condition of anonymity because the investigation was still ongoing.
Thirty Americans and eight Afghans - seven commandos and a civilian translator - were killed in the crash, making it the deadliest single loss for U.S. forces in the decade-long war in Afghanistan. The Rangers, special operations forces who work regularly with the SEALs, secured the crash site in the Tangi Joy Zarin area of Wardak province, about 60 miles (97 kilometers) southwest of Kabul, the other official said.
Both officials spoke on condition of anonymity to describe the event, as the investigation is still ongoing. The SEAL mission was first reported by CNN.
NATO was recovering the remains of the twin rotor Chinook helicopter. A current and a former U.S. official said the Americans included 22 SEALs, three Air Force members and a dog handler and his dog. The two spoke on condition of anonymity because military officials were still notifying the families of the dead.
All but two of the SEALs were from SEAL Team 6, the unit that killed bin Laden, U.S. officials said on condition of anonymity because they were not authorized to release the information.
Eight Taliban fighters were also killed in the battle, Taliban spokesman Zabiullah Mujahid said in a statement.
Afghanistan has more U.S. special operations troops, about 10,000, than any other theater of war. The forces, often joined by Afghan troops, are among the most effective weapons in the coalition's arsenal, conducting surveillance, infiltration and capture missions and night raids.
From April to July this year, 2,832 special operations raids captured 2,941 insurgents and killed 834, twice as many as during the same time period last year, according to NATO.
SEALs, Rangers, and other special operations troops are expected to be the vanguard of the American military effort in Afghanistan as international military forces start pulling out. By the time combat troops plan to have left the country, the coalition will have handed control of security to the Afghan forces they have spent tens of billions of dollars arming and training.
Special operations troops are expected to remain in the country after 2014 for counterterrorism missions and advisory support. Just how many will remain has not yet been negotiated with the Afghan government, but the United States is considering from 5,000 to 20,000, far fewer than the 100,000 U.S. troops there now.
Special operations forces are frequently used to target insurgent commanders as part of an effort to force the Taliban's leadership to agree to a negotiated peace. The operations, mostly in the form of night raids, are often carried out by Afghan and coalition special operations forces.
Night raids have drawn criticism from human rights activists and infuriated Afghan President Hamid Karzai, who says they anger and alienate the Afghan population.
But NATO commanders have said the raids are safer for civilians than relatively imprecise airstrikes.
As U.S. forces removed the wreckage Sunday, nearby Afghan and NATO forces battled insurgents as they carried out clearing operations in the areas around the crash site, a region that is just a stone's throw from the capital. The province, which borders Kabul, has increasingly come under Taliban control in recent months - even as the U.S.-led coalition has begun handing over security for parts of Afghanistan over to the government of President Hamid Karzai.
"There have been a small number of limited engagements in the same district" as Saturday's helicopter crash, NATO said in a statement. "However those clashes have not been in the direct vicinity of the crash site. As of now, we have no reporting to indicate any coalition casualties resulting from these engagements."
Associated Press Intelligence Writer Kimberly Dozier contributed to this story from Washington. Associated Press writer Lolita C. Baldor also contributed from Washington.