The 23 were buried in their homes by a landslide in Kohistan district on Monday. Rescuers could only find five injured people and two dead bodies that were pulled from the rubble.
“The rescue operation has been called off today and the elders of the area and local religious leaders have declared the landslide victims dead,” local police official Ali Rehmat told AFP.
The provincial disaster management authority said the landslide was massive and that hardly any machinery could reach the area to dig out victims as most of the roads were blocked.
It also confirmed the end of the search and put the new rain-related death toll in Khyber Pakhtunkhwa province to 90, pushing the overall toll to 117.
Communications were knocked out across much of the northwestern region after rains triggered the landslides.
The neighbouring province of Gilgit-Baltistan was the worst hit. About 175 landslides blocked roads, with stranded foreign tourists and local travellers airlifted by military planes and helicopters.
The military said that more than 600 troops were working around the clock to restore communications and clear roads in both provinces.
Poorly built homes across Pakistan, particularly in rural areas, are susceptible to collapse during the annual spring rains, which are often heavy.
Severe weather in recent years has killed hundreds and destroyed huge tracts of prime farmland.
During the rainy season last summer, torrential downpours and flooding killed 81 people and affected almost 300,000 people across the country.