For Mohammed Kamaluddin, home is a crude stone shelter against the rock wall of a wind-swept gorge in the bleak upper reaches of this valley. It is his family's third such "home" this year and may well not be the last.

Kamaluddin, a former shop-keeper, has been on the move for more than six months, one of tens of thousands of refugees from a bitter and continuing struggle for this strategic valley in the Hindu Kush. But, like a growing number of displaced civilians across the country, he has decided not to seek the security of refugee camps in Pakistan.

The 25-year-old man, who has three children, left his village in the lower Panjshir during a civilian evacuation on the eve of a major Soviet offensive against the resistance here last April. The exodus, organized by the valley's guerrilla command to avoid large-scale casualties, took place over several weeks before the Soviets struck and involved about 100,000 refugees -- the biggest such movement in the Afghan war so far.

According to rebel sources, about 1,200 civilians were killed during the April offensive and later bombing that spread beyond the Panjshir Valley. Fifty guerrillas also reportedly died in the offensive, the seventh launched against resistance forces here since the Soviet invasion of December 1979.

As Soviet TU16 bombers and low-level jets pounded suspected guerrilla positions and villages, several thousand refugees struggled across the mountains to the Chitral region of northern Pakistan. Most, however, scattered across provinces to the north to add to growing numbers of displaced Afghans reluctant to join more than 3 million others in Pakistani and Iranian refugee camps.

According to refugees here, the security of foreign camps is offset by crowded conditions, the hopelessness of an indefinite exile and the camps' distance from their homes.

"There is nothing for us in the camps in Pakistan," said one family head. "Life may be hard here, but at least this is our home."

The refugee said he was supporting his family with savings and with help from relatives and would return to his village when fighting dies down.

In the early stages of the war, which has now devastated the Panjshir, Jamiat-i-Islami, the Peshawar, Pakistan-based resistance organization, was able to give refugees some financial help. But under massive Soviet pressure, the mujaheddin guerrillas have been overwhelmed by the number of displaced civilians, and they admit that money is desperately needed to continue military operations.

In the chaos enveloping Afghanistan today, accurate refugee statistics have not been compiled. But some Pakistan-based analysts say they think that in addition to refugees outside the country, between 1 million and 2 million people have been displaced by fighting and Soviet bombing of the countryside, becoming internal refugees. The population of Afghanistan before the anticommunist revolt in 1978 has been estimated at between 16 million and 18 million.

Many Panjshir refugees have become squatters in temporary dwellings and caves in the mountains near here. Most, however, have fled to the neighboring valleys of Khost and Andarab, a walk of one or two days to the north. A few have moved as far away as Mazar-i-Sharif, near the Soviet border.

The reception has not always been cordial, refugees said. Both Khost and Andarab are valleys controlled by the resistance and earlier had been hardly touched by the war. But since April, the areas have become targets of Soviet bombing and commando operations. Many residents have blamed the attacks on the influx of refugees from the Panjshir and rebel fighters.

"The people in Khost gave us little help," said one refugee who spent two months in the area in the spring. "We had to make do as best we could, camping out in the mountains."

But guerrilla commanders here contended that the spread of fighting northward, while causing some friction, also has served to broaden military cooperation and spur rebels in hitherto peaceful areas to more active participation in the war.

Many other Panjshir civilians have fled to Kabul. With traditionally close links to the capital, which is only about 45 miles from the valley mouth, refugees from the Panjshir now constitute a large colony among a Kabul population that since the beginning of the war is estimated to have swollen from 600,000 or 800,000 to between 1.5 million and 2 million.

Numerous guerrillas still fighting here said they had families in Kabul. Rebel leaders said financial contributions from better off Panjshir refugees in the capital -- including government employes -- are a significant source of revenue for the resistance.

With the civilian exodus, the valley downstream from the gutted town of Dasht-e Rivat, 50 miles from the valley mouth, has effectively become a free-fire zone inhabited almost solely by combatants. Soviet and Afghan Army forces hold five positions along the valley floor, while in the upper valley and several side-valleys, guerrilla bands are dug in among the ruins of shattered villages.

Where possible, local guerrillas are struggling to maintain basic agriculture. In some mountain villages, fighters had put aside rifles and rocket-launchers to winnow grain and drive teams of oxen around threshing floors.

For the present at least, food remains sufficient despite systematic Soviet attempts at a scorched-earth campaign the length of the valley floor. Guerrilla units are living on a diet of bread, rice and meat soups. Wheat, rice, sugar and other basic commodities are transported into the Panjshir from neighboring valleys on pack horses running a gantlet of Soviet air strikes as they cross the mountain passes.

Against a backdrop of fighting and harassment from the air, a few civilians driven by advancing winter are cautiously filtering down from mountain hideouts to the charred ruins of their homes. Some optimists even have begun rebuilding.

But the vast majority of the valley's dispersed population is evidently staying put at safer distances for the winter. During the coming months, if not well beyond, indications are that the Panjshir will remain what it has been for most of this year: Afghanistan's best known and busiest killing ground.