It was 2:45 p.m. on May 21 when the rebels struck about 20 miles east of Kabul. As two Soviet-made armored patrol cars rounded a mountain bend into view of the hidden Afghan insurgents, three rocket-propelled grenades hurtled toward them.

Immediately, the heavy machine guns mounted on the fronts of the brown-and-green camouflaged vehicles opened up, firing randomly at the steep mountain side.

None of those first three antitank grenades found its target, and the lead vehicle for a moment seemed to have made good its escape, rounding the eastern bend and disappearing out of view along the road to the provincial capital of Jalalabad.

Witnessing the ambush from 100 yards off the road, on the opposite mountain face, all my worst fears about the capabilities of the Afghan guerrillas seemed to have come true. Although better armed than at the time of the Soviet invasion in December 1979, they did not look overly confident with the modern weaponry.

But within a matter of seconds I was proved devastatingly wrong, as both the armored vehicles lay belly-up and blackened.

One grenade after another homed in on target. Two heavily loaded trucks that the armored cars had been escorting to Jalalabad had come to a standstill, their engines engulfed in flames.

Spurred by a growing number of such attacks, the guerrillas say their morale is higher than at any point since the Soviets occupied their country with more than 80,000 troops. Although they realize that their holy war could go on indefinitely, they say their confidence has been boosted by the fact that, against all odds, they have been able to challenge the strength and modern armaments of one of the superpowers.

The morale of the Afghan insurgents was clearly visible in Peshawar, the capital of Pakistan's North-West Frontier Province, where journeys into Afghanistan with the rebels start.

It was there, several weeks ago, that I teamed up with Abdul Haq, one of the young commanders of a faction of Hezb-Islami, one of the six major rebel parties. His own exuberance did not seem merely that of youth. Haq has been fighting various Soviet-backed governments since 1978 and says he has been wounded too many times to see war as some exciting game.

Rather, he said his confidence stemmed from a belief that if the guerillas could continue improving their level of armaments, whose source he declined to name, they evenutally would be capable of winning the war.

During six days of hard walking, sometimes in stretches of up to 16 hours across steep, narrow mountain paths to reach the road between Kabul and Islamabad, we passed through valley after valley that appeared to be in complete control of the rebels. At no time during that trek did I see signs of the Afghan Marxist government or its Soviet backers.

Everywhere our small group traveled, the guerillas were greeted with respect and great hospitality, however poor a farmer host might be. Apart from a sore test of my own endurance, the days passed without incident.

Two things became clear during our march. First was the continuing exodus of Afghan refugees. In the first three days, we passed about 450 men, women and children, their donkeys overburdened and their impassive faces turned toward the safe haven of a United Nations tent in Pakistan.

The mass migration of about 100,000 Afghans a month tends to hamper the guerrillas in the short term. We confronted the problem the evening after the attack on the Kabul-Jalalabad road. Exhausted after a rapid seven-hour march, we reached the village where Haq planned to stay the night, only to find it in a state of extreme upheaval with many of its residents departing.

At the same time, the rebels acknowledge continuing problems with Soviet control of the air. Despite the rebels' now-sophisticated weapons and tactics, the Soviet control of the air limits their operations to small-scope, hit-and-run affairs like the attack against the armored patrol cars.

The attack itself was considered a complete success. Both armored vehicles, swerving to escape the rebel grenades were hit. Out of control, they smashed into a nearby stone wall and ended up side-by-side on their backs beside the road.

With additional hits, the vehicles soon were blackened hulls. Black columns of smoke filled the narrow gorge, and explosions of ammunition cannisters reverberated around the mountain walls.

Only two soldiers managed to scramble out of the vehicles. One of them, doubtless suffering from shock, clambered up into the open road and within seconds his body crumpled as the guerrillas' Soviet-made rifles opened up on him from all sides.

His companions met an even more unpleasant end. Two rebels rushed down from their positions and while the rest of the attacking force urged them on with cries of "God is Great," they lifted two rocks high above their heads and crashed them down on the skull of the cowering wounded soldier.

The danger now was that Soviet helicopter gunships, alerted by radio by one of the armored vehicles when the attack began, would launch a counterattack on the exposed rebels. They have more than respect for the gunships, appearing terrified of them, and knowing they have no arms to combat them.

But this time the gunships failed to appear until more than 45 minutes later, by which time we had made good our escape.