THE AFGHAN RULERS: FIERCELY TRADITIONAL TRIBES

By JERE VAN DYCK, Special to the New York Times; The following dispatch was written by a freelance journalist who recently spent six weeks in Afghanistan.

Published: December 21, 1981

MAHALAJAT, Afghanistan—
In mid-November, in a desert hamlet just across the border in Pakistan, Habibullah Karzai, a clean-shaven man who once represented Afghanistan at the United Nations, explained how the fighting in his country had turned him and almost every other Afghan back into tribal people.

''Afghanistan is now governed by one basic law, the law of the jungle,'' said the man who now serves as liaison between the fighters of his Popolzai tribe and the outside world. ''The people need something to grab onto, and in a land where 95 percent of the people are illiterate there is only one thing which they have - the ancient laws of their tribes.''

''As for the political parties based in Peshawar, they have no authority, no tradition, no laws,'' Mr. Karzai said. ''They have only been around for a few years. The tribes have existed for centuries.''

One of the undercurrents of the fighting is a fundamental conflict between the political groups that are seeking to extend their authority throughout the country and individual tribes that are deeply suspicious of outsiders, often even members of related clans, let alone people from other provinces or language groups. Groups Organized on Feudal Lines

And while it is the political parties with their spokesmen in Peshawar and their links to arms suppliers that have learned to promote their interests in the world press, most of the fighting groups inside Afghanistan are organized like most of Afghan life itself - along tribal and feudal lines.

In Kandahar Province, the strong imprint of tribal organization is evident in the landscape. Single-story, domed huts stretch out in a confused welter covering several scores of acres.

These settlements include many villages, and every one of the inhabitants knows where the boundaries are that separate clan from clan and where the influence of one tribal chief or Moslem preacher gives way to that of others. All are familiar with the history of their tribe and its customs, and powers of government in the sense of a nation state have always been flimsy and distant.

In Paktia Province, a mountainous area, the villages are more distinct and farther apart and each seems to exist as a selfsufficient unit. The people there make it clear that even before ''the Communists'' came they had little love of the central administration in Kabul, which they said merely tried to collect taxes or recruit troops or send bureaucrats who demanded bribes. Few Signs of Modernity

In the mountain hamlets, except for the weapons, the portable radios and the occasional helicopters overhead, it often appears that the tribal people have easily accommodated themselves to a return to the bronze age.

In Kandahar, the groups of mujahedeen, or Islamic warriors, always come from the same tribe and in most cases they are led by a chief who inherited the title. Often he is also the largest landlord in the area. In Paktia, almost all the fighting bands were led by mullahs, the priests or righteous men of Islam, but even in these cases tribal elders had key roles.

''No mullah can command a group of men in battle, or exert authority over anyone, unless the chief of his tribe agrees,'' explained Shah Mahoud Safi, the leader of 80,000 Safi tribesmen who live largely in Konar Province. Mr. Safi, is himself the leader of his tribal resistance army, and he says that although his men need arms and food, he will not pay homage to any political group in exchange for supplies.

For three days in November, this reporter lived with 25 guerrillas in a mountain encampment near Naka, a small village. The men, who had lived together for the previous two years as a fighting unit, moved through their daily duties without apparent commands. Some baked bread every day. Others brought water from a well, chopped wood or tended the animals, a horse, two mules and a camel. Members of one group took turns manning the antiaircraft gun. Prayers Five Times a Day

Five times a day, Mavleve Abdul Chargor cupped his hands and called the men to prayer. He was the mullah and the commander and seemed to be in authority. Yet, a few weeks earlier, when he had ordered a man and woman stoned to death for adultery, the order was countermanded. The local chief with authority over the couple, who were from the Mangal clan, ordered that they be shot instead. Tribal law, the code of behavior known as pushtanwali, had superseded Koranic precepts.

Under this system the requirement to extend hospitality to the traveler or fugitive is balanced by another obligation to avenge insults to the blood with blood. One afternoon, a group traveling along a mountain ridge found it necessary to stop while gunfire was exchanged between two clans in a valley below. The shooting lasted two hours and ended only when 10 men from one group emerged from a thicket, put down their rifles and washed in a stream before evening prayers.

Feuds of this sort sometimes linger for generations, and a number of Afghans say that badal, as the requirement of vendetta is called, will oblige tribesmen to avenge themselves on the Russians for the deaths of relatives. No Mercy Likely for Communists

Certainly, from the gruesome but unconfirmable stories that the guerrillas tell of killing and mutilating Soviet and Afghan soldiers, no mercy is likely to be shown to men regarded as Communists. This is a departure from the code of pushtanwali, which says that any man who asks for quarter in battle must be saved.

The fighting has had a revolutionary impact on the country. The richer and marginally more Westernized Afghans have in many cases fled to the West. Much larger numbers have crossed into sanctuary in Pakistan. Young men recruited into the Afghan army by press gangs on the streets of Kabul have defected and joined forces with rebels unrelated to them. Hope for National Unity Dim

There are some Westernized Afghans who feel and hope that out of the dislocation and turmoil some truly national leader might emerge but this has not yet happened and the tenacious hold of tribal identities makes it seem unlikely.

But if Afghan tribalism impedes the formation of any unified command, it also must frustrate the Russians and their Afghan followers.

''I don't see how the Communists can ever rule Afghanistan,'' said the urbane Mr. Karzai. ''For one thing they have the support of only 5 percent of the people and those people are all in the cities, cut off from the tribes. Second, no political system can work without an underlying culture, and in the East that culture is profoundly tribal.''

''It will take at least a century for a new culture to develop and the only way to speed up the process is for the Russians to do what the Khmer Rouge did in Kampuchea or what Stalin did in the Moslem areas of the Soviet Union,'' he went on. ''They must change the existing culture first to create a new culture and that means either genocide or driving the population out of the country.''