The picturesque Kurram Valley on the tense border with Afghanistan is bracing itself for new Afghan Air Force bombardments nine days after this remote guerrilla staging base was rocked by nighttime explosions that killed 32 insurgents.

Although some questions have been raised about the source of the explosions that destroyed several guerrilla hostels in a crowded bazaar here on Sept. 27, Pakistani officials and guerrilla leaders regard Teri Mangal as a prime target of Afghan Air Force jets, and witnesses say they are sure the blasts occurred during an air raid.

Late last week, Afghan rebels loaded pack horses with artillery shells and other supplies for reprisal raids against Soviet and Afghan troops in adjacent Paktia Province of Afghanistan. They said they expected that their successes against the forces of Afghan President Babrak Karmal would result in a new wave of cross-border air raids into the Pakistani territory that is openly used by the insurgents as a sanctuary.

The bombing and retaliation raids illustrate how Pakistan has been drawn unwillingly into the fighting between Afghan rebels and the armed forces of that country's Soviet-backed government.

The Moslem rebels said they doubted whether the conventional Pakistani air defense guns surrounding this border outpost would be effective against Soviet MiG fighter-bombers. However, they added that they intended to continue their attacks in Paktia, where western diplomatic sources estimate that two regiments totaling 12,000 to 14,000 Soviet troops have been deployed in an effort to stem cross-border guerrilla raids.

This outpost was shelled and bombed at least nine times between Aug. 13 and 24, and there have been frequent air strikes against other villages in this rugged Pathan tribal district that lies only about 50 miles from the Afghan capital of Kabul.

Teri Mangal, about 110 miles west of the Northwest Frontier Province capital of Peshawar, is at the tip of a finger of Pakistani territory that juts deep into Afghanistan near where Paktia and Nangarhar provinces meet. A western diplomat in Islamabad referred to it as the "Parrot's Beak," an allusion to the small salient in Cambodia that was used as a sanctuary by North Vietnamese forces during the Vietnam War.

Pakistani officials say there have been more than 40 shelling and air bombardments of Pakistani territory, resulting in more than 130 deaths. In August alone, they said, 54 persons were killed.

Also citing frequent violations of Pakistani airspace by Afghan Air Force warplanes, Foreign Minister Yaqub Khan told the U.N. General Assembly Monday that "Pakistan has so far acted with restraint, and it hopes that the concern of the international community over the continuation of such attacks and their dangerous consequences would compel those responsible to desist from further aggression."

Because of the remoteness of this border outpost and an absence of effective communications, there were conflicting reports about the Sept. 27 explosions that killed 32 persons and injured 48, while destroying more than 50 horses and mules.

Afghan guerrillas insisted in interviews that they heard the sound of a diving jet moments before the explosions destroyed mud-brick structures. They said the village was brightly lighted by parachute flares.

"We all heard the plane in the darkness. One plane came in three times and dropped two bombs. The bazaar was lighted like daytime," said Ghaffar Khan, 35, a mujaheddin, or guerrilla.

Zain Uddin, 22, of Logar Province in Afghanistan, said he was standing on a hilltop overlooking the bazaar when he heard "the noise of a plane in the darkness, and then some big explosions."

Uddin, who said he was leaving in two hours for a guerrilla raid in Logar Province, said that while a 10-square-mile area was lighted by flares, the bombing appeared to be from a fairly high altitude.

A week after the explosions, there was evidence of heavy damage in the bazaar and there were at least 30 freshly dug graves in a nearby "martyrs' cemetery."

A large crater was all that remained of a mud-brick structure that guerrillas said was a hotel, and another building nearby had been completely flattened.

However, although spokesmen for the Pakistani government insist that the explosions were caused by aerial bombardment, the circumstances of the reporting of the incident have raised questions that the bombs could have been planted on the ground.

Radio Afghanistan has claimed -- somewhat unconvincingly -- that the explosions were caused by bombs planted by a rival guerrilla faction. One Pakistani official, who asked not to be identified, noted that the initial report of the incident mentioned only "explosions" and that it was not until four hours later that there was a reference to an aircraft. The official suggested that bombs could have been planted by agents of Khad, the secret service of the Babrak government.

However, in nearby Parachinar, Sang-e-Marjan, political agent of the Kurram tribal district, said, "It was a bombardment. We have found nobody who said this was done by Khad agents."

Marjan cited other air raids in his tribal district, including 22 bombs dropped on the village of Kunjalizai in August, killing one woman, and an attack on Zeran, in which 12 planes bombed and strafed the village, killing one person. He said those daylight attacks could be seen from Parachinar.

Although the tribal political agent, the senior Pakistani official in the district, insisted that only "innocent refugees" were killed in the Teri Mangal explosions, guerrillas in the staging camp said otherwise. They said all of the dead were armed fighters.

Ghaffar Khan estimated that 4,000 to 5,000 armed mujaheddin were in Teri Mangal that night, and said that the bombing was in retaliation for a guerrilla attack eight days earlier against a Soviet and Afghan army convoy in Chakari Malang, in which he said 300 government and Soviet troops were killed. He said that more than 2,000 guerrillas remain here now, with the rest having left for reprisal attacks across the border.

Although tribal agency police are constantly present in Teri Mangal, the ostensible refugee camp is openly a staging base for guerrilla raids across the porous border, barely a mile away.

Pack horses laden with wooden crates containing mortar shells and ammunition for machine guns and Chinese-made assault rifles could be seen winding their way in broad daylight up the main dirt path through the village and toward the Afghan border that is visible just to the east.

Guerrillas armed with Kalashnikov rifles and wearing bandoleers of cartridges readied their gear and talked candidly about the missions they said they were about to embark upon. Most of the rickety shops in the dusty bazaar look like army surplus stores, selling everything from rifles and ammunition to knapsacks, canteens and combat boots.

Sitting on a dirt pile nearby, Azim Gul, 25, patted a heavily bandaged foot that he said was wounded by shrapnel in a raid in Chakaro, near Kabul, three days earlier. He vowed to return to battle as soon as he could walk. Gul, a member of the Hezb-i-Islami guerrilla group, said he was in Teri Mangal the night of the explosions and left the next morning with 65 other fighters for a reprisal raid.

The accounts of battle offered by the guerrillas, while colorfully laced in the traditional Pathan manner with embellishments of valor and daring, dramatically illustrate the shortness of distances in this commuter war that began with the December 1979 Soviet invasion of Afghanistan and the subsequent influx of 2 million to 3 million Afghan refugees to Pakistan.

That Gul could leave Teri Mangal on Sept. 28, participate in a guerrilla operation outside Kabul, spend two days riding back on a horse and talk of returning to battle exactly a week after leaving here underscores the dilemma facing the Soviets and the Babrak government as they attempt to cope with their U.S.-backed neighbor to the east.

Pakistan's president, Gen. Mohammed Zia ul-Haq, consistently has refused to acknowledge responsibility for the cross-border raids into Afghanistan, saying that if the Soviets think the winding, rugged border between the two countries can be sealed, then they should do it.

But while looking the other way at the cross-border traffic, the Pakistani government also is faced with a dilemma: If Soviet and Afghan army troops continue to suffer from stepped-up guerrilla activity, Pakistan could become the target of reprisal air raids into its territory.

With an inadequate air defense system in the tribal regions and Pakistani pilots under strict orders not to engage Afghan or Soviet air force planes unless they can be certain of a kill inside their own airspace, the Pakistani military can do little to prevent further air raids on refugee camps that also serve as guerrilla staging bases, western military analysts say.

"For Pakistan, striking back would be contrary to the basic policy of not letting themselves be provoked," a western diplomat said, noting that Afghanistan's Soviet-directed air defense system would, in any case, be too much for the Pakistani Air Force