The helicopter carrying US special forces that was shot down in Afghanistan on Saturday, killing 38 troops, was coming to the rescue of a team on a mission to capture a senior Taliban leader.

As the lumbering, twin-rotor Chinook troop transporter was coming in to land, US troops on the ground were in a serious confrontation with insurgents in the Tangi valley after their night raid went badly awry, it has emerged. The area is a hotbed for the Taliban and their Hizb-e-Islami allies to the west of Kabul.

The International Security Assistance Force (Isaf) said on Monday that other US special forces were looking for a "Taliban leader responsible for insurgent operations in the nearby Tangi valley". Local officials and residents have identified various leading local insurgents as the target of the night raid, a tactic that has been greatly expanded over the last two years.

However, the raiding party was discovered by a patrol of "several insurgents" armed with rocket propelled grenade (RPG) launchers and AK-47 assault rifles.

Early reports had said the aircraft was shot down taking off after the rescue. But in its first detailed public statement the US-led Isaf said it was hit landing in Wardak province. The crash, the worst single incident for the US of the 10-year war, killed everyone on board, including 25 US special forces soldiers as well as the crew and seven elite Afghan commandos.

Most of the soldiers were in the same Navy Seal Team Six unit that killed Osama bin Laden in May, although none was involved in the operation.

Night patrols appear to be a new insurgent tactic to counteract Isaf's devastating night raid campaign, with up to half a dozen such raids every night. Last year Taliban field commanders described to the Guardian some of their other methods used to counter night raids. Isaf said that although the engagement between the US raiders and the insurgent patrol resulted in the killing of "several enemies", they nonetheless had to call in additional support.

Military helicopters carry all sorts of devices to protect them against missile attacks but are at their most vulnerable at takeoff and landing when they are at relatively short range and moving slowly. Some Afghans who know the area well have suggested the Chinook was all the more vulnerable because of the local geography. "They had a clear shot, and the helicopter was hit right in the middle," said engineer Taous, head of a tribal shura in Wardak. "Because of the shape of the valley there is really only one way in and out. Immediately after the crash the original team that had been awaiting rescue had itself to tend to their colleagues, breaking off the fire fight in a desperate bid to "secure the scene and search for survivors". Yet more troops were also dispatched from a nearby base to assist. The Isaf statement said the helicopter had been "reportedly fired on by a rocket-propelled grenade", a common but fairly inaccurate weapon, but also said an investigation was under way to establish "the exact cause of the crash".

Rumours have circulated in Wardak that a more sophisticated anti-aircraft system had been deployed by insurgents, and there has been speculation among analysts that an improvised rocket-assisted mortar may have been to blame.

"Locals say they used a new weapon from Pakistan," said Roshanak Wardak, head of a nearby hospital. "It is some sort of a rocket that the Taliban had not used before, and did not know would work. It was the first time they had ever used this weapon." It has not been possible to verify the claims. The province's police chief General Muzafarudding also cast doubt on claims that insurgents used anything more powerful than relatively crude RPGs.