People here remember when hundreds of Pakistani Taliban militants roamed through the forested ridges flanking the Chail River, armed not with AK-47s but with axes.
Employing termite-like efficiency, the militants felled and carted away vast swaths of Himalayan cedar, blue pine and oak, leaving mountainsides dotted with stumps.
Through illegal logging, the Taliban generated quick cash to keep its arsenals stocked. But nearly a decade of tree felling by militants and 35 years of deforestation by unscrupulous timber businesses and wealthy landowners have had an unforeseen consequence.
Deforestation along the Swat Valley's waterways made destruction caused by this summer's massive floods measurably worse, experts say. The loss of dense woodland made stream and river banks much more prone to erosion. Riverside forests that could have stemmed the force of raging floodwater were gone.
No amount of forest could have averted disaster wrought by the monsoon downpours that in a matter of days equaled Pakistan's annual average rainfall. But many forestry experts and environmentalists say several decades of deforestation in northwestern Pakistan and the southern province of Sindh contributed to the toll the floods took in those regions.
"Deforestation played a tremendous role in aggravating the floods," said Ghulam Akbar, director of the Pakistan Wetlands Program, an environment protection group funded by the United Nations and other international organizations. "Had there been good forests, as we used to have 25 years back, the impact of flooding would have been much less."
Nestled between the snowcapped peaks of the Hindu Kush and the breadbasket plains of Punjab province, Swat Valley has long been Pakistan's emerald Shangri-La. Miles of persimmon, apple and peach orchards line meandering mountain lanes where the air is crisp and rivulets and streams run with water clean enough to drink in a cupped hand.
Look closer, however, and the scars left by the Pakistani Taliban earlier in the decade and by illegal loggers known locally as the "timber mafia" are easily seen throughout the valley's highlands. In places, only small tufts of trees are left, surrounded by bare land recently terraced to grow wheat and corn.
Loggers, with the help of local officials who look the other way for a price, have been flouting legal quotas and illegally felling and shipping Swat timber to the rest of Pakistan for decades. When the Taliban gained strength in Swat in 2003, its leaders saw logging as a revenue source. The militants either cut trees themselves or made timber mafia outfits pay for access to forests.
Environmentalists estimate that timber sales brought in thousands of dollars for the Taliban.
Because the militants had run police out of the region, laws that ban the movement of timber out of Swat couldn't be enforced. As much as 15% of the forest cover disappeared while the Taliban controlled Swat. Village elders and local environmentalists who spoke out against illegal logging risked being put on the Taliban's hit list.
Jamshed Ali Khan, head of a Swat environmentalist group called the Sarhad Awami Forestry Ittehad, said he and other people in Jari once tried to set up a check post on a main road leading out of Swat to monitor the trafficking of illegally logged timber.
"At that time, the timber mafia had joined hands with the Taliban, and the loggers told the Taliban that I should be wiped out," said Khan. The threat prompted him to move his family to the Punjab city of Rawalpindi for a year. "The Taliban made it clear that anyone who resisted them would be killed," he said.
A large-scale offensive waged by the Pakistani army flushed Taliban commanders and militants from Swat in the summer of 2009, but by that point the damage to the region's verdant landscape had been done. People in Chail say that when massive torrents of water suddenly fell in late July of this year, there wasn't any woodland left to weaken the current's force.
"It was like doomsday," said Fazl Raheem, a spry 70-year-old who lost his home, a guesthouse, his belongings and his poultry farm in the floods. Standing alongside the Chail River, he points to remnants of his property: a few jagged pieces of rebar jutting from the water and a mound of red bricks on the shore.
"There wouldn't be this amount of destruction if the trees were still here," he said. "It's OK if you need wood and you cut what you need. But deforestation like this is inexcusable."
In Sindh province, where flooding from the swollen Indus River damaged more than 1.1 million homes, large-scale deforestation along the banks occurred for a different reason. In the early 1990s, wealthy feudal landlords ordered teams of workers to clear vast stands of acacia, poplar and desert pine throughout much of the Indus Valley for the planting of cotton, sugar cane and wheat.
Though Pakistani law protects forests from illegal logging, it is rarely enforced, experts say. The Sindh landlords either enjoyed cozy ties with government power brokers or were in the government themselves.
"There's no respect for the law," said wetlands program director Akbar. "In the past, there have been instances when members of the timber mafia were also in the government. What can you do with that?"
In and around the village of Saleh Japar in northern Sindh, 10,000 acres of Indus Valley forest were cleared, says Mir Mohammed, 60, a farmer. The result was catastrophic, he and other farmers say.
Standing on a small dusty berm, he gazed out at an expanse of mud-brown floodwater that extended to the horizon. All of it used to be forest, he said.
"The Indus would flood before, but the forests would slow down the water pressure," Mohammed said. "But with the forests gone, the water flowed freely and destroyed our houses, our fields, our roads, everything.
"Everyone was angry when the trees were cut, but what can a poor man do?"