A small group of Afghan insurgents traveled last May to the plains of Parwan, north of the capital city of Kabul, with plans to ambush convoys of the occupying Soviet forces. Armed with antitank weapons they could fire from behind the thick mud walls of Afghan villages, they hoped to cut the vital highway between Kabul and the Soviet Union.

The attacks never materialized. Instead, these Islamic rebels were halted by brutal fighting among other insurgent forces -- the result of factional rivalries that have weakened Afghanistan's resistance groups throughout a year and a half of battling the Soviets.

In the border town of Peshawar in neighboring Pakistan, leaders of the six major resistance groups have spoken optimistically of new alliances. But in weeks of traveling with the small rebel force, it became clear how the Afghans have engaged in two civil wars simultaneously -- and how they appear likely to continue in spite of their agreements.

For three weeks in May and June while I was with the rebels, nearly all attacks on the Soviets in a wide area north of Kabul came to a complete standstill because of the feuding. The factional fighting ranged from the plains of Parwan to the Panjshir valley, 30 to 50 miles north of Kabul, and was reportedly the heaviest since the Soviets landed their troops.

I was taken to the area by a Hesbi Islami faction led by Younis Khalis to witness a planned attack on Soviet convoys along the Kabul highway. Instead, for eight days, I watched from a house a mile or two north of Bagram air base while the factional battles raged in half a dozen places to the north.

The fighting was largely between the main Hesbi Islami faction headed by Gulbuddin Hekmatyar and the other major Islamic fundamentalist party, the Jamiati Islami. It left hundreds dead in Parwan alone. The rebels used all the weapons at their disposal: automatic rifles, heavy Soviet machine guns and rocket-propelled grenades.

For the local population, frequently confronted as well by Soviet helicopter attacks, the infighting was particularly terrifying. Apart from the devastation of their villages, they faced the added threat that anyone dashing for safety could easily be mistaken as "enemy" rebels by one of the warring parties.

In many areas, Gulbuddin's forces, according to the accounts I received, were ambushing other rebels -- whatever their party -- and like the highwaymen of 18th-century Europe, demanding their weapons or their lives.

The disunity among the other insurgent parties effectively meant that any efforts to subdue the attacks of the Gulbuddin faction were doomed. Each party maintained that it will only act if personally attacked.

There were mediation efforts, by village elders incensed that Moslem was fighting Moslem and by other major parties worried that they might be caught up in the struggle. None of the talks succeeded, however, and most degenerated into loud and incoherent debating.

I witnessed one mediation meeting in the grounds of a mosque close to Bagram air base. Fighting between Gulbuddin and the Jamiati Islami had broken out late that Sunday, May 31, and lasted through the night. By the next morning the Soviets had joined in. Six of their helicopter gunships rocketed and strafed the bazaar of the tiny town of Mahmond Rahi before Mig25 jets finished the place off with a 10-minute bombardment.

That afternoon, village elders -- shuffling old men with long white beards and faces strained by 60 or more years of a grinding existence -- filed into the tree-filled courtyard of the mosque. They were followed by an assortment of much younger men belts stuffed with ammunition flung over their shoulders, pistols bouncing on their hips, AK47 assault rifles in one hand.

By the time the meeting started 50 men were all talking excitedly at the same time. Only now and again could one or other of the major commanders insist on silence to make his views heard. While the Jamiati Islami commander declared that he saw no future in such clashes, the Gulbuddin leader insisted that it was his "task" to push all Jamiati Islami people out of the area.

Or, as he put it to me in stumbling English, "Jamiati not right here. It belong to me."

The remark illustrated what all the factional fighting is about: regional dominance, the prestige of boasting in the border camps of Pakistan and beyond that "my party controls the area completely."

After three weeks of watching Afghans slaughter Afghans on the Parwan plains while the Soviets were neglected, I did witness what, by all reports, is a rare event: two factions of insurgents combining to fight a Soviet force.

Ten days after the heaviest factional fighting had died down, the rebels I have been accompanying moved down from one of their camps high up in the mountains to the valleys north of the capital. There, just north of the town of Qarabagh along the highway north of Kabul, Younis Khalis' faction of the Hezbi Islami began preparing for action.

Just as the three commanders and their six deputies were scribbling a plan for attacking the highway on grimy bits of paper -- their eight men stretched out in a wide circle around them -- a young man came running up, completely out of breath.

The words stumbled out, and it was clear something bad was up.

The previous four days had seen concerted rebel attacks on convoys on the road. It had now been closed and large numbers of Soviet tanks and armored patrol cars had moved up to halt further attacks. The young rebel said that one of these detachments had nearly completed an encirclement of another group of rebels.

The plans of Khalis' force were immediately scrapped. Without even finding out the details from the stuttering young man, the rebels were up and off.

It was three miles to the scene of the fighting. We ran through country that is in many ways perfect for the insurgents, full of grapevines and fields of fruit trees, each surrounded by the high, thick mud walls so typical of Afghanistan. In between the walls are alleys far too narrow for the Soviet vehicles.

One mile away the 80 men were split into four equal groups, each armed with one or two antitank rocket launchers. The group I was with was given the southernmost position, to hold off any Soviet reinforcements. The main battle raged 500 to a 1,000 yards away from us for two hours -- and could only be described as a success for the rebels.

A number of homes of local residents were destroyed by the fight and 15 civilians and insurgents were killed. But the Soviets were in the end forced to turn back and the brilliance of the early evening was crudely disturbed by plumes of black, foul-smelling smoke -- evidence of the destruction of four tanks and four patrol cars.

The 20 men I was with finally came into action as the Soviets pulled back in two phases. The men squatted to fire behind small holes in the wall no more than 40 or 50 yards from the road -- a risky position that few of them seemed to fear.

The first tanks and patrol cars came by quickly, not bothering to return fire, and only the last of the armored cars was hit. But it was a different matter with the second, larger group of tanks. As the last rebel rockets homed on the second tank to come into sight -- huge flames immediately rising from its turret -- the other vehicles opened fire.

Suddently, sections of wall all around us began collapsing and the rebels bolted. With evening upon us, red tracer bullets came at us from all angles. Luckily, they were all too high. We dodged from ditch to ditch across fields of grapevines, only hoping to escape, to vanish down the alleys.

With only a 100 yards to go, we had to pass through a tight and low hold though a wall into the grapevines ahead, and for a moment the men panicked. Their commander, young but experienced, kept his head. He pulled the men away from the hole, then pushed them through one at a time. The commander and I passed through last, and moments later I was showered with mud as the upper section of the wall simply disintegrated.

By that time, though, we were just about out of reach of the Soviet guns, and there came that amazing moment after battle -- the moment when you sense everything more clearly than ever before, completely silenced by the delight of survival.