For nearly three hours we lay behind the cover of the dark granite boulders at the top of the ridge and watched Soviet soldiers surrounding and searching the houses below us. The troops had turned up somewhat unexpectedly after 2 p.m., Oct. 25.

Warned by the growling engines of the five armored personnel carriers (APCs) that preceded the long line of trucks with about 150 soldiers, the 12 insurgents I was with just managed to rush up the barren mountain slope in time. Although we were sporadically shot at during the rest of the afternoon, the troops made no active move against us.

Instead, with the APCs blocking the various roads, the soldiers surrounded this village, eight miles directly south of Kabul, and began searching the houses. The insurgents watched and waited.

As the autumn sun began to disappear behind the snow-covered peaks of the Hindu Kush to the west, the guerrilla commander, Abdul Halim, motioned for me to follow him. "They leave now; we attack," he explained and bolted down the slope. After a hectic dash across the recently harvested fields, the guerrillas, backed by about 40 others, opened fire on the departing Soviet vehicles.

Two of the BTR60 APCs, now at the rear of the column, were hit and burst into flames, but none of the other APCs stopped to counterattack. They followed the trucks as fast as possible back to their barracks in Kabul. It was an understandable decision, for while the guerrillas were hardly discernible in the dusk, the armored cars would have made sitting targets for them.

The events of that afternoon are one example of how the superior, more sophisticated Soviet military resources have not assured the Soviets of success against the insurgents in Afghanistan.

Soviet concentration on the use of armor against the guerrillas has not succeeded in defeating them because the insurgents' superior mobility allows them to escape. In addition, guerrilla ties to a population overwhelmingly sympathetic to their aims ensure that they are often tipped off about when the Soviets are about to arrive in force.

As a result, the Soviets have begun switching to more mobile tactics, including the use of helicopter-borne infantry to trap insurgents, as exemplified by the drive in the late spring against insurgents in the Panjshir Valley, 50 miles north of Kabul.

The more flexible Soviet counterinsurgency operations have been under way only for the past nine months, however, and the Soviets have not yet gone all-out to crush the guerrillas.

The other major problem for the Soviets is the unreliability of the Afghan Army. Since Soviet troops intervened in Afghanistan on Christmas Eve 1979, they have been hampered consistently by their generally weak and vulnerable Afghan allies. Sixty percent of the Afghan Army has defected to the resistance, while both the Army officer corps and much of the civil service is riddled with sympathizers of the mujaheddin who have provided the guerrillas with a constant flow of information.

In July 1981, I witnessed a major Soviet offensive against the resistance stronghold in the Paghman region, 15 miles northwest of Kabul, which illustrated the extent to which the Soviets' tactical reliance on armor curtailed their effectiveness in dealing with the mujaheddin guerrillas. The attack was launched from three sides, and in each case tanks and APCs led the way, backed by only relatively few Afghan infantry units. Although the armor was able to make generally easy headway over the hilly, rather than mountainous, terrain, the troops were confronted by an enemy that was not so easily visible, nor as densely deployed as conventional military forces would be.

The battle lasted for three days, with the guerrillas not holding on to any specific line of defense, but moving about in small groups of four or five men and making maximum use of their RPG7 antitank grenade launchers.

Only occasionally were the insurgents confronted by infantry and put under effective pressure. By the third evening, although the armor had penetrated far into guerrilla-held territory, the Soviet commanders gave the order to withdraw.

That attack illustrates the problems facing a conventional army using conventional military tactics while fighting mobile guerrillas, especially in a country where the guerrillas can disappear into the mountains if need be. While their commitment to armor undoubtedly kept casualties down, it also meant that the Soviet commanders were unable to get to grips with and actively engage the mujaheddin.

In May, the Soviets launched their fifth offensive against the by now almost legendary guerrilla base in the Panjshir Valley, which is located near the key supply route linking the Afghan capital to the Soviet Union. Under the leadership of Commander Ahmad Shah Massoud, the insurgents had set up what was virtually a separate government, with a complete system of education, justice and taxation.

The attack on this occasion was led by helicopter-borne paratroopers and infantry who were dropped on the various mountain ridges above the valley and were able to hold most of the high ground as the main body of armor and trucks moved through the narrow southern entrance into the valley proper.

In the past, the insurgents had been able to halt the armor precisely from such high ground; now they were forced to flee into the side-valleys along with the civilian population. While helicopter gunships and MiG jet fighters bombed and strafed the side-valleys, the main Soviet force for the first time occupied the district capital Rokheh and moved 35 miles up the valley, setting up eight military posts as it did so.

In July, a similar offensive was launched against the guerrillas in Paghman. Again helicopter-borne infantry troops were dropped ahead of the armor.

Local commander Achum Zada told me: "The operation was quite different to those of last year. Many of the mujaheddin were virtually surrounded, hours before the tanks moved in. Casualties have been high and the Russians were able to set up 12 new posts."

Both offensives indicate a willingness on the part of Soviet commanders to incur higher casualties, as they are bound to do in deploying troops in the open, in an effort to deal more effectively with the guerrillas. Despite this, the Soviet counterinsurgency operations this year have only had limited success.

Once the troops moved into the new posts in Paghman, the guerrillas counterattacked. By the middle of September, 10 posts were destroyed and the Paghman region, which Radio Kabul had claimed was "pacified," remained one of the major insurgent bases.

In the Panjshir, Soviet successes were, if anything, even more limited. The cause was not so much Soviet failures or ineffectiveness as it was the Afghan Army.

At the beginning of May, Commander Massoud was warned by clandestine sympathizers of the impending offensive. When the Soviets moved into the valley they found that the insurgents had moved up the mountains or into the barely reachable side-valleys. The Soviets were able to move up the valley, but that was their only achievement. Guerrilla losses were extremely low. Most of the fighting that did occur was initiated by the mujaheddin, for the most part night attacks against the exposed infantry on the mountain ridges and the various posts the Soviets had established. Soviet casualties were reportedly high.

Toward the end of June, Soviet troops were pulled back and replaced by units of the Afghan Army. Within a matter of weeks, everything that had been accomplished was lost. More than 1,300 Afghan soldiers defected to the resistance and by the beginning of August the guerrillas had regained control of the whole of the valley except the village of Rokheh, where a Soviet presence was maintained.

In an earlier instance, in February, guerrillas operating in Parwan Province, just south of the Panjshir, were caught unprepared by a combined Soviet-Afghan Army attack. The Soviets had planned the attack carefully and made the large-scale troop movements appear to be heading for the Panjshir. The ruse worked. The mujaheddin were caught in complete disarray, surrounded after a week of heavy fighting and about to run out of both ammunition and food.

It was at that vital moment that certain Afghan Army units opened unguarded corridors through which eventually the main body of guerrillas managed to escape.

The poor record of the Soviet commanders in Afghanistan cannot, however, be solely ascribed either to their tactical reliance on armor or to the conduct of the Afghan Army. Time and again, correspondents traveling through Afghanistan with the insurgents have reported examples of almost incomprehensible behavior on the part of the Soviets.

On Oct. 7, between 4,000 and 6,000 Soviet troops surrounded the precipitous mountain hide-out of Commander Abdul Halim, just 10 miles south of Kabul. Halim, who I was with at the time and who has since been killed in a raid against the Soviets, was warned in advance by an informer who was an agent in the Afghan secret police, or Khad, and managed to withdraw his men further to the south in the nick of time. He assured me that within six or seven days we would be able to return to the 30 or so natural caves (perfect shelters in case of air attack), which formed the heart of his base. He was right.

A week later an advance party reported that it was safe to return -- the Soviets had pulled out and the caves were still intact. It is this last piece of information that is cause for amazement--having failed to capture their foes, the Soviets did nothing to deter them from returning: the caves were not blown up nor booby-trapped nor the mountain-side mined. Everything -- even the pots, the pans and the blankets -- was left untouched.

Similar surprise can be voiced at the actions, or, more precisely, the inaction of Soviet troops during two guerrilla raids I witnessed well into the built-up urban center of the capital. During the first operation, no counterattack was undertaken, despite the fact that a military transport depot was set ablaze. During the second, some Soviet troops and armored personnel carriers belatedly arrived on the scene, only to retreat when they came under concerted fire.

Possibly the most incongruous report came from the Panjshir this summer. Peter Jouvenal, a free-lance British cameraman, reported that the guerrillas had captured a SA7 heat-seeking antiaircraft missile from one of the Soviet paratroopers deployed in the initial advance into the valley. The insurgents, Jouvenal said, were as baffled as he was. The resistance may be better armed, but they do not as yet have an air force against which surface-to-air missiles could be used. Furthermore, the SA7 is precisely the kind of weapon the mujaheddin desperately need and seek to capture to combat Soviet air capability.

It is difficult, if not impossible, to explain such ineptitude. One reason would appear to be an inflexible, rigid hierachy controlling the armed forces.

While generally coping with the ground attacks launched against them, the insurgents have yet to find an answer to Soviet air control, particularly the helicopter gunships. The gunships, for the most part MI24s, have been the one success story of the Soviet military involvement in Afghanistan.

Their deployment generally has limited the guerrillas to night attacks and has caused fear in the countryside. It has been gunship attacks on the villages that caused the massive exodus to Pakistan and Iran (more than 20 percent of the population before the invasion is now believed to have fled the country).

Almost every village I encountered during the two treks I have made in Afghanistan bore visible scars of such gunship rocket attacks and this would seem to indicate a conscious decision on the part of the Soviet command to strike at the general rural population in the knowledge that the presence and support of the rural population is essential for the survival of any guerrilla movement. It is a tactic that has had some success.

In areas where the civilian population has fled, the insurgents are forced to farm as well as to fight, while many still populated villages have persuaded local guerrillas to keep their distance and set up bases elsewhere.

The Soviets have never been able to close the 1,400-mile border with Pakistan, and the insurgents continue to move across at will into a mountainous countryside in which they feel hardly threatened. During the past three years there has been a steady, if relatively small, increase in the number of Soviet troops. There are now about 105,000 in Afghanistan, compared to 85,000 in December 1979. Most of this increase has been deployed to offset the disintegration of the Afghan Army caused by the huge defections.

Western defense experts, initially so skeptical of the strength of the insurgency, believe that Moscow would have to treble its forces if the Kremlin wants to deal effectively with the guerrillas.