Rescue workers and troops in northwest Pakistan struggled Saturday to reach thousands of people affected by the country's worst floods in living memory, as the death toll rose to 800.

Hundreds of homes and vast swathes of farmland were destroyed in the northwest and Pakistani Kashmir, with the main highway to China reportedly cut and communities isolated as monsoon rains caused flash floods and landslides.

The United Nations said almost a million people had been affected by the flooding, and at least 45 bridges destroyed around Khyber Pakhtunkhwa province.

Television footage and photos shot from helicopters showed people clinging to the walls and roof tops of damaged houses as gushing waters rampaged through inundated villages.

Carrying their belongings and with children on their shoulders, some even walked barefoot through the water to seek safety.

"This is the worst ever flood in the province of Khyber Pakhtunkhwa in the country's history," provincial information minister Mian Iftikhar Hussain said.

"The death toll in floods and rain-related incidents has risen up to 800 across the province," he said.

Another 150 people were missing in the northwestern province, where many impoverished families live in remote mountain villages.

More than one million people have been affected, the minister said, adding that more than 3,700 houses had been swept away by floods and that the number of homeless people was rising.

Peshawar, the main city in the northwest, and the districts of Swat and Shangla were cut off from the rest of country as roads and highways were submerged, he said.

Police said five people were drowned when their boat capsized near the northwestern town of Nowshehra on Saturday.

An AFP reporter saw hundreds of people arriving in Peshawar city, many of them without any belongings.

Muqaddir Khan, 25, who arrived with nine other family members, told AFP in a suburb of Peshawar that he had lost everything in flood.

"I laboured hard in Saudi Arabia for three years and set up a small shop which was swept away by flood in minutes. I have lost everything," Khan said.

Razia Bibi, 48, said she and her family spent the night awake as water kept rising.

"My house is now gone under water and I could escape with a few belongings," Bibi told AFP.

Authorities are using school buildings in Peshawar to shelter those affected by the floods.

The army said it had sent boats and helicopters to rescue stranded people and its engineers were trying to open roads and divert water from key routes.

The flooding capped a week of tragedy for Pakistan, after an airliner crashed into hills near Islamabad Wednesday, killing 152 people on board.

Pakistan's weather bureau said an "unprecedented" 312 millimetres (12 inches) of rain had fallen in 36 hours in the northwest but predicted only scattered showers during coming days.

Provincial relief commissioner Shakil Qadir said the worst-hit area was Malakand, where 102 people died and 16,000 were marooned because bridges had collapsed and road links been cut.

Qadir said that around 2,800 Pakistani holidaymakers were stranded in the Swat valley, where the military maintains a heavy presence after a massive operation against Taliban insurgents last year.

Efforts were being made to airlift the holidaymakers to safety in helicopters, he said.

The Karakoram Highway, which links Pakistan to China, was closed as rains washed away a bridge in Shangla district, also cutting off Gilgit-Baltistan from other parts of the country, media reports said.

Northwest Pakistan has been hardest hit but monsoon rains have also killed 25 people in the southwestern province of Baluchistan over the past few days, a senior officer of the disaster management authority, Ataullah Khan, told AFP in the provincial capital, Quetta.

Flash floods had affected eight districts, he said, adding that around 275,000 people had been affected and more than 15,000 houses destroyed.