Declan Walsh travels to the source of the Indus river, high up in the Swat valley guardian.co.uk

The Chinook helicopters, travelling in pairs, swooped and curled between the lush valley walls of the Hindu Kush. The aftermath of Pakistan's epic flood scrolled underneath: torn bridges, crushed houses, entire fields swept away by the racing waters.

Inside the helicopters about 70 highland peasants, mostly fathers and their sons, gripping one another in terror and wonderment. Some poked fingers in their ears against the deafening engine roar; others peered out of the open hatch, awestruck – they had never seen their homeland like this before.

At a small military base the villagers stumbled out of the Chinooks, clothes pressed to their skin by the powerful rotorwash. Then their rescuers – silent American soldiers in black, bug-like helmets, eyes hidden behind mysterious looking black visors, turned around and headed back up the valley for more.

The sight of US soldiers in the Swat valley, which only last year was a Taliban stronghold, is one of the many effects of Pakistan's superflood. Swat was the starting point of the calamity, where a biblical downpour of rain lasting three days gave birth to a torrent that would sweep across the length of Pakistan.

Downstream, the waters moved relatively slowly, smothering fields and houses. But in Swat the flood moved with raw and destructive power, a high-velocity train that demolished everything in its path – aid workers compared it to the aftermath of the 2004 tsunami in Indonesia – and left tens of thousands of people cut off from the outside world.

That is where the Americans stepped in. The US has spent $362m (£229m) on flood aid, dispatching 26 helicopters to deliver food and evacuate stranded villagers in Swat and Sindh. Some of the choppers have been flown in from Alaska, others hop off an aircraft carrier, the USS Peleliu, anchored in the Arabian Sea. Between four and six cargo aircraft arrive with more aid every day.

The Americans say their airlift is a mercy mission – "When all those children come running to us, it just makes my heart drop," said Specialist Eric Schmidt, one of the Chinook-borne soldiers – but it also has a strategic component. Americans are despised across Pakistan, with the latest Pes survey showing that 60% of Pakistanis view them as an enemy. The American embassy in Islamabad is churning out press releases about the assistance, hoping to make a dent in that figure. "We want to get the good news out," says one press officer.

On the ground, though, it is not so easy. Co-operation with their Pakistani counterparts can be stiff, even tense. Americans are not allowed to carry guns; so the only weapons are borne by Pakistani commandos.

At Ghazi airbase a Pakistani sentry said he admired the money and resources they brought to the aid effort. "But what they really want is to take our nuclear bombs," he added.

In the choppers US soldiers wear helmet patches commemorating other soldiers killed in Iraq and Afghanistan, wars that are viewed with great hostility in Pakistan. The Americans struggle to understand Pakistani priorities. One flight filled with aid was diverted to pick up a Pakistani general, who hopped on board, gripping his wooden baton. The food aid was not delivered. "All that, just to give the general a joyride," grumbled one American.

At least they were not fighting – something that could not be said of the alliance further south, along the border. Today Nato supply trucks were blocked on the Khyber Pass for a second day in retaliation for a Nato helicopter attack on a Pakistani border post that killed three soldiers.

It was the fourth such cross-border strike in a week – last weekend, US Apache helicopters killed up to 50 militants inside Pakistan as they fled across the border from Afghanistan. Meanwhile, in the tribal belt armed CIA drones carried out 21 strikes in September – the highest number since the cloaked campaign started six years ago.

But gratitude to America has risen. In Jare, midway up the valley, thousands of people clambered along a riverbank because the road had been swept away. About 60 metres above them, half-houses protruded from a cliff-face that had been shorn off by the water; a shattered toilet and kitchen sink lay among the river rocks below. A pair of US Chinooks whizzed overhead.

"We don't like the drones when they target innocents," said Izhar Ali, an 18-year-old student. "But our people need help now, and we don't care where it comes from."

Last July Swatis might have been forgiven for thinking their misfortune was over. The army offensive in 2009 cleared the Taliban from much of the valley; the stone-faced insurgent leader Maulvi Fazlullah had fled to Afghanistan. Shopkeepers painted Pakistan flags on their shutters; this summer the authorities dared to organise a tourist festival. Few visitors came, but it was a sign of hope.

In more than 60 hours of non-stop torrential rainfall, the floods washed all that away. The north-west normally receives 500mm (20in) of rain in the month of July; over one five-day period 5,000mm fell. "It was incredible," said Sameenullah Afridi, a local United Nations official.

Environmental neglect exacerbated the damage. Decades of deforestation, driven by a "timber mafia" that includes the Taliban, had denuded most valley slopes. So the racing downpour funnelled into the middle of the valley.

Salim Ahmed was among the victims. Described as a softly-spoken labourer recently returned from the building sites of Dubai, Salim rushed out to save his animals. But as the waters gushed around him, he could not save himself.

He became trapped under a tree. In a quiet glade by their riverside home, Salim's teenage sons described the agony of watching their father cling desperately to life.

"We had a pair of binoculars and we could see him trying to keep busy, climbing up the tree," said Jamil, 17. They begged the army to send a helicopter but the rain was too much. A day later Salim slipped away; his body was recovered 10 miles downstream. He left behind six boys and one girl. "We don't know how we will survive now," said his son.

For most Swatis, the focus has turned to reconstruction. The scale of the task is daunting: 45 bridges destroyed, at least 10,000 acres of land washed away, countless houses and shops destroyed. Further north large chunks of the famed Karakoram highway, a celebrated feat of engineering built by the Chinese over 20 years, have simply melted away; it may take years to re-open.

In Madyan, about halfway up the valley, half of the district hospital was swept away. The remainder is stranded in the middle of the riverbed, like something that dropped from the sky.

Leaving Madyan bearded men and burka-clad women clamber over hills and take rickety chairlifts across the river. One is powered with an ingenious contraption rigged up to a parked car. Along the way they pass Pakistani soldiers at the controls of earthmovers, cutting a makeshift road.

The Taliban tried to claim the floods were a curse from Allah, but even they were not safe. At the once proud militant headquarters in Imam Dheri, across from the main town Mingora, the courtyard where bearded men flogged accused criminals is layered with soft sand. The mosque itself – a pile of rubble since last year's fighting - is coated in slime. The scene resembles an ancient ruin.

But the Taliban are by no means history. In August militants torched two schools in Kalam – the highland district where the US helicopters are dropping aid, and a major pocket of resistance.

Sameen, a 22-year-old fleeing the area, said the army rounded up a number of suspects afterwards. "They got the wrong people. They were locked up for a day, without tea or food. Later we paid a bribe and they were freed," he said with a shrug.

Has Pakistan's army been overstretched by the flood effort? In the southern part of the valley bazaars are thriving and giggly uniformed children – girls and boys – rush to class. But under the patina of normality lies tensions. In some areas farmers are not allowed grow tall maize – a potential source of cover for militants. In the nearby villages walls are daubed with army phone numbers – informer hotlines.

There are army checkposts every few miles, even in remote areas, cars slalom through concrete barriers watched by closed circuit television cameras. The patriotic fever suggested by the proliferation of green and white flags is not entirely voluntary. One of the few traders, speaking on condition of anonymity, said they had been forced to paint the flags.

Suspected militant sympathisers disappear from their homes at night; some are found dead. A video on the internet this week purported to show soldiers executing Taliban militants in Swat.

The army says it is a fake. Inside the offices of an international aid agency, one manager warns that "around here, nobody will tell you the truth". He said: "They're too scared to talk. If I say something to you, someone may be listening. And if they go to the army, then who will protect me?"

Will the flood make the Americans more popular? The precedents are not encouraging. After the 2005 earthquake the US military also dispatched a fleet of Chinooks into the mountains. A year later, US popularity ratings nudged up by four points.

But 12 months after that, as the Bush administration clung to the floundering dictator Pervez Musharraf, the numbers plunged to their lowest level since 2001. In Pakistan, there are some things that aid just cannot fix.