The sun had long gone down. Sher Khan, a Pakistani climber on his first major expedition, had been dozing in his sleeping bag for an hour. Above the camp, the snowy flanks of Nanga Parbat, the world's ninth highest mountain, were pale in the deepening night. Suddenly, Khan heard shouts of "Surrender! We are Al-Qaida! Taliban!" then, in Urdu "Where are the Americans?"

Awake now and very frightened, Khan looked out of his tent. Men in camouflage fatigues and carrying AK47s were moving though the camp, pitched at around 3,500m below the famous Diamer Face of what is known among mountaineers as "the Killer Mountain".

Good weather meant most of the 40 mountaineers who had been camping on the lush meadow amid pine trees were high up on the 8,125m peak. But the sick and the tired were not. Nor were the support staff. They were dragged out, tied, lined up and shot. Khan, from a village a few hours drive away, was spared. A Shia cook died. A Chinese climber managed to flee.

"It was so bad, so bad. I was so lucky to get out alive. I still cannot sleep," Khan told the Guardian.

The attack, a month ago, was the first to directly target foreigners in the area. The dead included three Ukrainians, two Slovaks, a Nepali, a Lithuanian, two Chinese and a Chinese-US dual national. It shocked many locally, and made headlines around the world.

A candlelit vigil was held in Gilgit, the local administrative centre 150kms from the site of the attack.

"We wanted to send a message that we are against this killing of innocent tourists. We have such beautiful mountains, beautiful valleys. We want to share them with the world," said Mohammed Zaeem Zia, the local doctor who organised the demonstration.

But the significance of the attack was greater than simply its impact on a niche extreme sport, albeit one which earns much-needed foreign currency for economically troubled Pakistan. It signalled a fresh escalation in a battle to control Pakistan's remote northwest and a further extension of the reach of the country's extremists. Its location, as well as the identity of the attackers and of the intended victims, has ramifications across a huge and strategically important territory.

In the immediate aftermath of the attack, the Pakistani Taliban (TTP) said one of the factions that form part of the group had been responsible. The aim, a spokesman said, was to exact revenge for the killing of a senior TTP leader in a recent US drone strike.

Identification of the attackers is important, revealing how extremism has spread into regions beyond the restive western parts of Pakistan where local and international attention has been focussed.

Investigations are still underway. Ali Sher, senior officer in charge of the inquiry, told the Guardian that 60 people had been questioned, 16 were still being investigated and four were in custody after being surrendered by elders.

"We have recovered weapons and the camouflaged uniforms. The situation is now under control," he said.

Nanga Parbat, the world's ninth highest mountain. Photograph: Paula Bronstein/Getty

Three of those identified by authorities were from the violent province of Khyber Pakhtunkhwa (KPK) to the southwest of the site of the attack. Sher, the climber who was spared, said the gunmen spoke mainly Urdu, the Pakistani national language, rather than Pashto, spoken in the restive western regions, or Shina, the local language of communities close to the mountain.

"The use of Urdu probably indicates they were a mixed bag and Urdu was the one language they all had in common," said one local official. Many appear to be from in or around the scruffy town of Chilas which sits astride the crucial Karakoram Highway, the winding road which runs from Pakistan's northern plains through the gorges carved by the Indus up into the Himalayas and on to China, a distance of 1,250 kilometres.

Qazi Inayatullah, the head of the local council of elders in Chilas denied anyone in the town was involved in the Nanga Parbat attack. "The police gave us the names of 10 men they wanted. One [man] on the list simply doesn't exist. We haven't seen four others for years. No one here has any connection to this violence. It was the work of outside powers hoping to destabilise Pakistan," he said. But Chilas and the surrounding area has a history of violence, though not hitherto directed at foreigners. Instead the targets have largely been the Shia Muslim, who make up three quarters of the population of the semi-autonomous division of Gilgit-Baltistan and whose villages dominate the upper reaches of the Karakoram Highway.

Last year there were three massacres of Shias close to the road, in which 46 died. One occurred in Chilas itself after an attack, apparently targeting Sunnis, in Gilgit. A mob stopped buses on the crucial road and lynched Shias.

"That was not terrorism, it was retaliation," said Inayatullah, the Chilas elder.

To the east of Nanga Parbat lies the region of Baltistan, and some of highest mountains in world. This is a zone troubled since the 1980s by competing efforts of states such as Saudi Arabia and their geopolitical rivals Iran to give local Shia and Sunni communities an edge over their co-religionists. Beyond lies Kashmir, the former princely state still disputed by India and Pakistan. To the west lies Swat, site of a huge army operation after it was overtaken by militants in 2009, and then the Afghan frontier.

Some of the attackers are thought to have come from the Tangir Valley, a maze of inaccessible valleys and ridges to the west of the Karakoram Highway and south of the site of the attack. One senior local official described the area as, "an administrative black hole".

Communities here are as conservative, lawless and well armed as any along the restive Pakistani frontier with Afghanistan. Ten years ago, locals burned schools funded by the World Bank and NGOs, copying the Taliban in Afghanistan. The female literacy rate is 0.02 percent, according to government figures. Hundreds of men have died fighting as "mujahideen" in Afghanistan or Kashmir. Many here are committed to reactionary, extremist ideologies.

"Every wall is painted with jihadi slogans. The local clerics are connected to the [Pakistani] Taliban. I have heard of men divorcing their wives for letting their children to be treated in hospitals, because they believe all modern medicine is a western plot," the official said.

A climber ascends Nanga Parbat, known as the Killer Mountain. Photograph: Alamy

Malik Mohammed Miskeen, former lawmaker and elder in Tangir, said the Nanga Parbat attack was unique. "Nothing like this has happened before. It is part of the world conspiracy against Pakistan. So much foreign money is flooding our area and they are buying people to do this kind of act," he said.

The attackers – who numbered around 30 – found their way to the camp apparently unaided and undetected. The trail takes two days from the roadhead, an hour's drive from the Karakoram Highway, and passes three local villages, one with a school founded by legendary climber Reinhold Messner.

Liwer Das, a local guide who works regularly with international expeditions, dismissed any possibility of local villages helping the militants.

"These people earn their livings from the climbers. Any development at all and any jobs in the valley depend on the tourists coming," he said.

Sher Khan's account gives an insight into the mixed motives of the attackers. Though they identified themselves as "al-Qaida" or "Taliban", their first priority seemed straightforward robbery, he said. Some were teenagers, most in their 20s. Their leader was older.

"They were shouting 'where are the Americans?' but they were also shouting for money. Everyone brought out what they had: dollars, euros, rupees, whatever," he said.

It was only after the camp had been systematically ransacked that the captives were lined up and then shot.

"They were shouting God is Great, long live Islam and long live Osama bin Laden," Khan remembered. "They kept shouting as they left. I remember one shouting: 'this is revenge for Sheikh bin Laden."

The founder of al-Qaida was killed two years ago, at his hide-out in Abbottabad, 250km away at the start of the Karakoram Highway.

The 2013 climbing season in Gilgit-Baltistan is now ruined, expedition organisers say, with little hope that next year will bring the climbers back.

Syed Atta-ur-Rehman, the top law and order bureaucrat in the division, said that security was now better.

"We are doing our best with the available resources to stop any problems," he said.

Mohammed Ali, a local expedition organiser, had sent a small team to Nanga Parbat last month. His climbers were already high on the mountain when the militants came and so escaped the attack. But a cook, 28, who had three young children, was among those shot.

"In the past there was no problem. This was a peaceful region. This is something [new]. It is very sad," said Mohammed Ali. "I think now the situation is better. I pray to God that this is so."

Additional reporting by Farooq Ahmed Khan, Gilgit