There is an almost romantic flavor to this rumbustious frontier settlement of two-story mud and stone buildings, rickety bazaar stalls, and refugee tents.
The green Islamic flags of various exiled Afghan resistance parties flutter from roofs. The occasional trial rifle shot or machine-gun burst, about as natural in these parts as the honking of cars in a New York City traffic jam, echoes across the valley.
Similar to dozens of other camps and villages along Pakistan's 1,400-mile border with Afghanistan, Terimangal serves both as temporary haven for refugees fleeing the war - and launching point for Afghan resistance supply convoys.
At least one-fifth of Afghanistan's population has now sought refuge in Pakistan and Iran. Pakistan itself has to grapple with the world's largest refugee problem for any single host country. The refugees' plight here is imbued with a sense of unresolved permanence.
Since the autumn of 1979, this correspondent has repeatedly visited the refugee areas. Today, after 21/2 years and with no end in sight to the conflict, it no longer seems inappropriate to call it ''the new Palestinian problem.'' The most immediate comparative impression among this country's 232 camps is that these are no longer merely ''tent cities'' but long-term establishments.
Gone are most of the white canvas shelters that used to dot the barren mountainsides and valleys. Sprawling suburbs and settlements of mud and stone houses intermingled with bazaar stalls, mosques, schools, health centers, workshops, and even gardens have sprung up in their stead. Persian flows easily where, only three or four years ago, Pashto was the dominant language.
As with the Palestinians, the armed conflict for the homeland remains omnipresent. And not unlike the Palestine Liberation Organization, the Peshawar-based resistance parties are becoming more polished in their ability to arouse political awareness among both the refugees and the Afghans still inside their own country. They are tring to keep the feelings of the anti-communist Jihad (holy war) alive.
Only three years ago, this ramshackle Wild West-style village was used as a mere depot for timber merchants and as a stopover for passing nomads.
Today, clusters of chin-wagging and shouting Afghan guerrillas, nomads, fugitives, and local Pakistani tribesmen mill around the main dust-clogged thoroughfare. Plodding camels, loaded with huge beams of lumber from the pine-forested mountains of Afghanistan, wander with blithe indifference through the jostling throngs.
A few yards away, amid the rubbish-strewn caravan yards, Afghan merchants and mujahideen (rebel fighters) oversee the loading of pack animals with rice, sugar , medecines, and (somewhat more surreptitiously) guns.
Even if the Pakistan authorities really wanted to, there is little they could do to control the enormous amount of clandestine overland traffic that filters day and night across the some 320-odd passes that traverse the Durand Line, the 1893 British-drawn demarcation boundary that still divides the two countries.
If anything, Pakistan's prime concern these days is to stop the infiltration of weapons from the Kabul regime to support dissident political groups inside Pakistan, rather than vice versa. Such groups include the anti-Zia Zulfikar organization led by Murtaza Bhutto, the son of erstwhile Prime Minister Zulfikar Ali Bhutto, who was executed by the present military government in 1979.
Furthermore, the Pakistan government is anxious to prevent its own feuding Sunni and Shiite Muslim tribesmen from obtaining weapons larger than the traditional Enfield rifle.
Pakistan finds it difficult to exercise much jurisdiction over its tribal areas where the carrying of a gun is a fundamental right. In one recent flare-up between the two Muslim groups, for instance, this correspondent was blocked for four days while Mangal Sunni and Turri Shiite tribesmen at Sadda blasted each other with mortars, machine guns, and Kalashnikovs, killing over 100 people.
''They were almost better armed than most of the Afghan guerrillas or even our Army,'' comented one Pakistani major. Passing through Sadda later, its burned out shops, houses, and caved-in walls looked worse hit than many towns and villages in neighboring Afghanistan.
Nevertheless, a solitary military fort, built by the British and still buttressed with rusted, iron gunports, maintains the formal pretenses of central Pakistan government rule. It stands like a medieval castle on a rocky knoll overlooking Terimangal.
From this fort's lonely ramparts, a small detachment of black-bereted Kurram scouts picket the winding dirt road leading to Afghanistan just beyond the ridge. So long as the Afghan mujahideen remain reasonably discreet about their cross-border activities and make no trouble in the settlement, the government appears to ignore them.
Since the Soviet invasion of Afghanistan in December, 1979, there has been very strong pressure on the regime of Pakistani President Muhammad Zia ul-Haq from Moscow and Kabul to keep the now estimated 2.5 million Afghan refugees under greater restraint. The Soviets have tried to get the Pakistanis not only to move refugee camps well away from the mainly mountainous frontier areas, but also to intern or at least neutralize the expatriate Afghan political organizations based in Peshawar.
The Soviets have also offered Pakistanthe chance to join a Moscow-inspired Asian collective security pact, which, they assert, would enable Pakistan to arm itself with weapons less costly than expensive new US arms.
So far, President Zia has firmly rejected such advances. In a recent interview with Gordon Brook-Shepherd, a British historian, Zia said:
''Their first tactic was to tell me to close the border - just seal it. I told them this was physically impossible for us and asked why they, with far more resources, didn't try themselves. After all, you can shut a door from both sides. . . . They had to admit they couldn't do it either.''
The refugees are increasingly becoming the scapegoats of Zia's martial law regime. Not only is there acrimony because of foreign aid grants to the refugees , but also because of the considerable freedom enjoyed by the resistance organizations. This freedom is rigorously denied to Pakistani parties under martial law.
There is fear, too, both among the Pakistani Baluch and Pathans, that the Afghans may settle down permanently on this side of the border. Although numerous refugees maintain that all they want to do is to return to their homes, it is evident that as time goes on people will have begun to construct new lives and will think twice about leaving their newfound security.
The overall cost of providing for the refugees (roughly $1 million per day) comes mainly from the United Nations High Commissioner for Refugees (UNHCR), the World Food Program, the United States, the European Community, Japan, and the Gulf countries. Among most Pakistanis, the general attitude toward the Afghans remains surprisingly hospitable.
But the refugee concentrations inevitably cause a severe burden on local resources. And occasionally tensions also have resulted from what some Pakistanis consider to be ''unfair'' business and job competition.
''Actions groups'' in politically sensitive Baluchistan have been intervening since last March to prevent Afghans from working, usually at lower wages than the already poorly paid Pakistani laborers. In an attempt to placate locals, police have been sent in to close the numerous small shops set up by enterprising Afghans.
Similar to the refugee areas in the Horn of Africa, one pressing problems is the presence of some 3 million Afghan camels, cattle, sheep, and goats, which, according to relief officials, have ''grazed the pastures into sand.'' Refugees have also indiscriminately cut trees and shrubs for firewood, causing severe soil erosion.
Another notable dilemma is education. Although the camps now have their own primary as well as a certain number of secondary schools, foreign governments such as the United States are unwilling to start a trend toward resettlement, or even temporary asylum. Increasing numbers of students are therefore finding themselves stranded in Pakistan, unable to continue their studies at local universities but also prevented from going abroad. This has begun to lead to considerable frustration and highlights a problem that needs to be dealt with rapidly if Afghanistan is to be ensured properly educated personnel to help in an eventual reconstruction.Britain recently granted 28 higher education places to Afghan graduates for further study. ''But it is a real dilemma,'' noted one British diplomat. ''On the one hand, we want to give a lot of these young people a chance to fully educate themselves. But then, quite frankly, once they leave, it seems unlikely that many of them will ever return. If we indiscriminately open the gate, we will only cause a 'brain drain' and there will be no one left to put the country back on its feet.''
During a recent trek into Afghanistan, this correspondent came across only a few refugees heading towardthe Pakistani border. The influx has dropped considerably compared to last year. Many farming communities, particularly those in the border provinces, have sent most of their family members to Pakistan for safety, while leaving a small caretaker force behind to cultivate the fields.
As before, many Afghans conveniently use the food and shelter facilities of the Pakistani camps to care for their women and children, giving them the freedom to return to Afghanistan to fight with the mujahideen. This has raised criticism that many refugees have not come over because of danger, but rather to exploit free refugee relief.
UNHCR and other international relief officials agree that repatriation remains the only solution to the Afghan refugee problem. But so long as no political settlement exists, there is no hope of them returning voluntarily.
Last month's Geneva ''proximity talks'' under UN sponsorship between Pakistan and Afghanistan seemed doomed from the very beginning because the main combatants - the Russians and the guerrilla groups - were not present. Despite the continued lack of unity among the Afghan resistance organizations, there seemed to be an overall consensus with the statement of one guerrilla commander from Loghar Province:
''The Parchemites (the dominant communist faction in Kabul) can make as many agreements as they want with Pakistan, the United States, or anyone else.
''But as long as the Russians remain in our country, we will keep up our struggle.''