For the Afghan refugees at this camp in western Pakistan, home is just over a snow-covered mountain.

That is why they refuse to leave their remote, rocky hilltop for camps deeper inside Pakistan where they might find easier access to relief aid and a more hospitable climate.

"We want to live here, as close as possible to our country," says Mitta Khan, a grizzled villager wounded in fighting against Afghan government troops two months ago. Nevertheless, he refuses to return to Afghanistan without new weapons and ammunition to carry on a guerrilla war against the Soviet troops that invaded his country last month.

We have to stay here,"Khan said, "because we're helpless and empty-handed."

For the Pakistani authorities who administer and guard this territory, which jabs like a finger into Afghanistan's eastern flank, thousands of heavily armed refugees on this side of the border can only mean trouble.

In view of what they regard as a Soviet threat to their country's fragile integrity, the Pakistani armed forces here are taking care to keep a low profile and avoid any activities that might appear provocative to their neighbor.

At headquarters in nearby Parachinar of the district's Frontier Corps, the Pakistani military's border guards, a young officer acknowledged that the Army deliberately was not reinforcing its troops here because that might entail reciporcal action by the Soviets.

"Then, just one spark and there would be war," the officer said. So far, he said, the Soviets have not made any move to deploy in strength along Afghanistan' eastern border with Pakistan, although that is where much of the Afghan rebel activity has been concentrated.

Nor has there been any effort by the new rulers in the Afghan capital of Kabul to man the border posts near the Afghan village of Patan a few miles north of here. From the Pakistani side, the fortress-like Afghan post shows no sign of life. Like many other such posts, according to Pakistani officers, it has long been abandoned.

Except for the nearby Pakistani border station, manned by a dozen guards, there appears to be nothing to stop the flow of refugees across the border. The border station is easily avoided.

However, local authorities have received reports, which they have not been able to confirm, that Soviet forces have mined the dirt roads leading to that crossing point. In any case, most other passes through the area's high mountains have been blocked by snow, and refugee crossings lately have slowed to a trickle.

An estimated 600,000 Afghan refugees have fled to Pakistan since an April 1978 coup brought the first of three Marxist governments to power.

One place where Afghan refugees are still able to cross is over the relatively low mountains just west of this camp. That was the route taken three weeks ago by the 50 families -- nearly the entire population of the Afghan village of Sikram near the town of Gardez -- that now live in a conglomeration of about 30 tents, 20 camels and assorted cattle, goats, chickens and dogs.

In mid-December, according to Ghanam Rang, the camps' elder, bombing destroyed many of the houses in the village. Even cattle were killed, he said

"Throughout the year we were subjected to bombing," Rang said. "Then when we could no longer put up any resistance, we had to leave."

Rang and other refugees claim that even before the Dec. 27 Soviet-inspired coup in Afghanistan, the air strikes against Afghan villages were carried out by Soviet pilots.

Other accounts by refugees in this area vary little. Most describe spontaneous local uprisings against a communist Afghan government regarded as un-Islamic and infidel, followed by harsh retaliation including aerial bombardment of villages, then a trek to Pakistan because of inadequate means to fight back.

"Nobody incited us to fight against the enemy," Rang said. "We ourselves started fighting for the glory of Islam. We are believers in God, and these people wanted us to leave our faith. Tell me, how can I renounce my religion?"

Conditions here are among the most miserable of the Afghan refugee camps that have sprung up since Moslem rebels began to wage an uncoordinated guerrilla war against the central goverenment 20 months ago. The refugees at Matasangar Camp live almost exclusively on bread and tea. They say none of the food donated by foreign relief agencies and governments has reached here yet.

What they have received so far has been wheat flour sold to them at reduced prices by the financially strapped Pakistani government, as well as some donated tents and blankets.

The subsidized Pakistani food program also is stretched thin. To supplement a U.N. World Food Program relief effort that is just getting off the ground, the Pakistanis also are giving the refugees four biscuits a person each month. The world Food Program is to supply $5 million worth of wheat, lentils, vegetable oil and dry skim milk over a six-month period. But that will fall well short of the refugees' estimated needs.

The altitude here is higher -- about 5,700 feet -- and the weather harsher than at any other camp. About 20 persons, most of them children, have died in the subfreezing temperatures since this and an adjacent camp were set up.

In their tents -- most of them leaky patchworks of hemp matting and sectins of canvas -- partitions of dried mud separate the refugees' sleeping areas from spaces for their animals.

One reason for concern is growing resentment among Pakistani Moslems of the Shiite sect against Afghan refugees, who are almost entirely Sunni Moslems.

"The Shiites are not happy with the influx of Afghan refugees in this area," said Taj Mohammad Khan, the federal administrator of the Kurram Agency, or district, in Parachinar.

"They fear that if the Sunnis settle here, it will disturb the balance. To show their displeasure, they have killed a number of Afghan refugees on the road."

He said that since November, 12 refugees have been killed near Parachinar, which has a Shiite majority.

Pakistani Sunnis, who are in the majority nationwide, seem to be tolerating the refugees, if not always welcoming them with open arms. Local Pakistani officials charged with distributing assistance to the refugees here appear genuinely interested in helping them and try hard to allocate their meager resources.