KORAN, AFGHANISTAN -- As resistance fighters burst into the Afghan government's military police garrison here, a rebel rifle bullet smashed into the chest of the garrison commander, sending him sprawling in death across his own bed.

Around him lay the wreckage of petty officialdom. Files, ledgers and papers were strewn across the floor; chairs were overturned and cabinets smashed open. Torn and trampled underfoot were propaganda posters and pamphlets hailing a brave socialist future for an Afghanistan that he, for one, would never see.

The expression frozen on the man's face seemed less one of pain than of surprise at how the mujaheddin, or Islamic "holy warriors," had swept quickly across this base in a rugged but strategic valley of Afghanistan's northeast. Most of the government forces surrendered within an hour and 40 minutes after the attack began.

The attack, witnessed by this reporter during a three-month trip through northeastern Afghanistan that ended two weeks ago, was one of a string of victories that appears to mark significant developments in the war between the resistance -- backed by mainly U.S. and Saudi Arabian aid -- and the Soviet Army and troops of the communist government in Kabul. The Soviet forces invaded this country on Christmas eight years ago in a move that jolted the region, the Islamic world and superpower relations.

The mujaheddin are becoming more effective militarily in this part of the country, with skilled military commanders using more unified forces. The rebels are strengthening and expanding administrative structures in areas where they have expanded their control over terrain.

The attack on Koran had begun in the frozen half-light of dawn, shortly before 6 a.m. on Oct. 29. Guerrilla infantrymen swept in on the base under a barrage of mortar, rocket and recoilless-rifle fire.

By 7:30 it was all but over. As half-hearted resistance in the main Army base, the military police compound and outlying posts collapsed in quick succession, the government's dispirited conscripts threw aside their weapons to surrender en masse.

Only a unit of KHAD, the Kabul government's well-paid secret police, resisted through the morning before being overrun at midday.

The assault by mujaheddin of the fundamentalist Jamiat-i-Islami (Islamic Society) -- one of seven parties in the main resistance alliance based in neighboring Pakistan -- required weeks of planning by the party's foremost commander in northern Afghanistan, Ahmed Shah Massoud.

In a style typical of his own approach to warfare -- but at striking variance with the often poorly organized operations of many mujahed commanders -- Massoud and his senior aides had prepared the operation in meticulous detail. In their planning they had used videotapes and enlarged photographs of the target, as well as a table-top scale model of the Koran Valley that showed every building and heavy-weapon position in the communist garrison. Defectors from the 298-man base supplied details on enemy numbers, unit positions and their inventory of weapons.

"The important thing in operations now is that they should be effective," said one guerrilla commander before the attack. "If we can't be sure they'll be effective, we don't make them."

In a series of planning sessions before the conference attended by a small group of western reporters, Massoud briefed all commanders and most units of the 550-man attacking force on their specific missions.

Drawn from Jamiat-i-Islami groups across northeastern Afghanistan, the mujahed force was made up of both support units, whose job was to dominate the mountains above the valley floor, and infantry assault teams. The support teams on the heights included crews armed with U.S.-supplied Stinger ground-to-air missiles to defend against Soviet or Afghan jets or helicopter gunships that might have been called in to strike Massoud's force.The Fruits of a Victory

The capture of Koran -- first seized from disorganized local mujaheddin by Soviet helicopter-borne commandos in mid-1982 -- and the subsequent surrender of pro-Kabul militia in the neighboring valley of Monjan -- reopened an important supply trail between Massoud's forces and the resistance's bases in northern Pakistan. Such trails to Pakistan are the vital links over which Afghanistan's rebels bring in arms and other goods supplied by the United States and Saudi Arabia, each of which reportedly contributes $250 million per year in aid. Afghan civilians use the same trails to flee war-torn villages for refugee camps in Pakistan that now hold an estimated 3 million people.

When springtime melts the snow from the high passes of the towering Hindu Kush mountains, the newly opened trail will cut the travel time between here and Pakistan from two weeks to four days.

The fall of Koran was the latest in a string of little-reported successes over the past two years by Jamiat mujaheddin led by Massoud, a 35-year-old guerrilla strategist who rose to prominence in the bitterly contested Panjsher Valley northeast of Kabul. In most of Afghanistan, the guerrillas' attacks simply harass and inflict losses on Soviet and Afghan government posts. But Massoud has managed to capture important Afghan communist bases.

In mid-1985, his forces briefly took over an Afghan Army garrison at Puzhgur, in the Panjsher Valley, capturing 400 government troops. The Soviet-led troops forced the guerrillas out, but, under continuous pressure, abandoned Puzhgur last September. "Presumably the Soviets decided it simply wasn't worth helping {the Afghan Army} hang in there," said a western military analyst.

In 1986, Massoud took the garrison town of Farkhar, in northern Takhar Province, and, with allied mujaheddin, overran an Afghan Army divisional headquarters at Nahrin in Baghlan Province. Last July, Massoud's men took another garrison, at Kalafgan, on the border of Takhar and Badakhshan provinces, in only two hours of fighting.

Officials of the Jamiat-i-Islami said that while these operations had been against admittedly "soft" Afghan targets, rather than Soviet bases, they had helped consolidate resistance control over important areas of the northeast and had captured large stocks of arms and ammunition. The victories also had boosted the morale of both fighters and civilians in the region, the officials said. Massoud of Panjsher

In his carefully planned surprise attacks, Massoud has kept casualties low among his men. Fourteen mujaheddin were killed and 11 wounded at Koran, while the government lost 29 killed and 266 captured, according to Jamiat. In the earlier victories, the guerrillas said, they had lost between one and 21 fighters.

In a briefing for western reporters after the Koran battle, Massoud called his men's losses unacceptably high. He said they had been caused mainly by the failure of some support weapons to reach mountain positions under cover of darkness before the assault. Freezing conditions and a shortage of local porters in the thinly populated area had hindered transport, he noted. "By the beginning of the fighting only 60 percent of our heavy weapons were in place," he said.

In the early years of the Afghan war, Massoud, a former engineering student in the capital, Kabul, had established a resistance stronghold in the Panjsher Valley. From there, he regularly attacked the Soviets' vital supply route from the Soviet Union to Kabul and built a reputation for organizational skills rare among Afghanistan's generally tradition-oriented resistance commanders.

Between 1980 and 1984, the Soviets mounted eight offensives into the Panjsher, and negotiated a truce with Massoud in 1983.

Massoud was criticized by many in the resistance for the truce, but it allowed him to regroup in the valley and found an umbrella organization, the Supervisory Council of the North, to unify mujahed forces in nearby regions.

Massoud's organizing efforts were interrupted for nearly two years while he battled massive Soviet offensives, which devastated and largely depopulated the lower Panjsher Valley and finally established five communist garrisons on the valley floor.

At the end of a year of almost continuous fighting in 1985, Massoud and a hard core of Panjsheri guerrillas left the valley to expand contacts with like-minded Jamiat commanders and set up new bases across the northern flanks of the Hindu Kush range, which cuts across northeastern Afghanistan.

"Our most important desire was not just to wage war in the Panjsher," he explained in an interview in September, "but to expand and develop our organization."

Foreign observers, including journalists, photographers and academics who travel regularly to northern Afghanistan, agree that Jamiat has markedly expanded its political and military organization in the northeast during the past two years. In most of Afghanistan, local commanders -- even those belonging to the same resistance party -- operate independently of each other. The Pakistan-based parties usually do not coordinate their local commanders' activities and often simply supply them with arms in exchange for the commanders' adherence to the party banner. But Jamiat's Supervisory Council of the North, still headed by Massoud, is coordinating military and civil activities of the party's commanders. A basic administrative infrastructure and new forms of military organization have been established, these observers noted.

According to both Jamiat officials and westerners who have visited the region, the Supervisory Council of the North now exercises broad control over most rural areas of Parwan, Kapisa, Takhar, Baghlan and Kunduz provinces, along with large portions of Badakhshan Province in the extreme northeast. But Massoud and his senior aides conceded that, in Badakhshan, organizing has been slowed by differences among Jamiat commanders and persistent infighting between the dominant Jamiat and pockets of ultra-fundamentalists of the Moslem Wahhabi sect.

Resistance sources are tight-lipped over the number of mujaheddin fighting under the council's banner. And foreign analysts caution that, given the problems of communications in rugged terrain and the widely varying effectiveness of guerrilla groups, numbers mean little in conventional military terms. Tribal Rivalries in South

Still, informed estimates in mujahed circles put the forces under the council's umbrella at 20,000 to 25,000. There are no reliable figures on the number of mujaheddin fighters country-wide, but veteran observers estimate that there are more than 100,000 within the active resistance.

Northeastern Afghanistan is inhabited mainly by ethnic Tajiks and Uzbeks gathered into farming communities, and analysts pointed out that the nontribal nature of their society has facilitated the creation of a unified command structure and administrative bodies.

By contrast, in Afghanistan's south and southeast, dominated by rivalrous ethnic Pathan tribes, the resistance has proved far less effective in broadening military and civil organization, they said. Building a Guerrilla Base

The leaders of the Supervisory Council of the North are trying to establish economically self-supporting bases for the guerrilla war in the valleys of the northern Hindu Kush. According to Massoud, the leaders view their expanding political-military organization as part of that process. During the interview, in a mountain village in Takhar Province, Massoud said such organization-building aims at mobilizing the rural population behind the war effort and an Islamic ideology.

The proliferation of resistance base areas complicates Soviet retaliatory offensives, Massoud noted. "A sole base cannot survive," he said, referring to the now devastated Panjsher. "We have to establish one and then rapidly develop others."

As organizational work has been stepped up under the council, Massoud has worked to downgrade the prominence of the Panjsher in an effort to counter what critics have attacked as "Panjsheri chauvinism," said close aides said.

Aides to Massoud said efforts have been made to replace Panjsheri cadres who have occupied senior military or civil positions under the council. "The policy is now to use local, indigenous people in leadership positions," said Mohammed Es'Haq, a Pakistan-based senior Jamiat official.

Sources noted that Massoud also had decided to reduce his own high profile while boosting that of other council commanders, most of them Islamic fundamentalists in their thirties and forties with similar views on the need for political and military organization.

The consolidation of new guerrilla bases, a broad administrative system and self-supporting rural economies is basic to plans for what Massoud believes will be a protracted war of resistance. An avowed Islamic revolutionary from his student days -- but widely noted for pragmatism and flexibility -- the guerrilla chief expressed skepticism over the likelihood of a Soviet withdrawal that would permit genuine Afghan self-determination.

Massoud reiterated his opposition to any political settlement that would involve the return of the former king, Zahir Shah, adding that any such settlement imposed by outside powers would be unlikely to last long inside Afghanistan.

Among both the leadership and rank and file of the Jamiat-i-Islami -- as well as its main fundamentalist rival, the Hezb-i-Islami led by Gulbuddin Hekmatyar -- the former king is seen as having paved the way for Soviet intervention in the 1970s. Such Afghans also criticize Zahir because he has distanced himself from the resistance struggle since the Soviet invasion and insist he has no place in a postwar regime.

Massoud's vision of a protracted, popular-based guerrilla war in which rural areas surround and strangle an urban-based enemy appears to draw heavily on Chinese and Vietnamese guerrilla experiences, noted analysts of the war in northern Afghanistan. But Massoud emphasized the overriding influence of Afghan conditions on his strategy.

"There is no copy, no blueprint," he said. "Our struggle is based on our experience inside the country and on a study of external experiences. But mostly our thinking is based on a study of domestic experiences."

According to Massoud's analysis of the war, the resistance is currently in a lengthy period of "strategic" or "active" defense, during which base areas expand and consolidate, political and military organization moves forward and the rural population is mobilized behind an Islamic ideology.

Meanwhile, as outlying government-held district centers are captured and guerrilla forces gain experience, the communist regime will gradually be reduced to holding provincial cities and struggling to keep open lines of communication between them, he argues. From Defense to Offense

In the future, Massoud said, resistance forces, trained and experienced in conventional engagements, would be able to shift to strategic offensives. Shorter than the defensive stage of the war, such an offensive phase would aim to sever major communications arteries and increase pressure on the Soviet-backed government's urban bases.

A broadened strategic offensive might culminate in popular anti-Soviet uprisings in urban areas, leading to the collapse of the communist government, Massoud suggested.

Current operations against government garrisons in the northeast are aimed at clearing communist enclaves from the resistance's mountainous base areas, he explained. At the same time, the operations mark the opening moves of a gradual shift from small-scale, hit-and-run guerrilla tactics to mobile warfare. In mobile warfare, scattered guerrilla units are concentrated for conventional or semiconventional operations, launching surprise strikes and dispersing before the might of a superior enemy can be brought to bear.

The growth of organized resistance in the northeast has involved local pacts between the forces of Jamiat-i-Islami -- predominant in the region -- and mujaheddin of other parties who make up the overall resistance alliance. According to resistance sources, groups of guerrillas loyal to the Harakat-i-Inqalab-i-Islami (the Islamic Revolutionary Movement), a moderate member of the seven-party alliance, joined Jamiat forces in operations against the Army garrisons in Nahrin and Kalafgan.

And despite longstanding and bitter rivalry between Jamiat and the other major fundamentalist faction, the Hezb, Massoud claimed to have opened negotiations with leading Hezb commanders in the northeast in efforts to cement a broad anti-Soviet alliance.

"We are working toward the creation of regional and local alliances with other parties," he said. "This work is progressing well."

At the same time, Jamiat's Supervisory Council of the North has extended contacts with other resistance forces -- generally of the Jamiat -- operating beyond the council's northeastern strongholds, the sources said. According to senior Jamiat officials and foreign analysts, increasing contacts are being made with Jamiat groups across the northern border provinces of Samangan, Balkh and Jowzjan as well as south of the Hindu Kush range in Laghman, Kunar and Nangahar provinces and around the capital.

Soviet reaction to consolidation of the resistance in the mountains of the northeast has been mixed, observers said. During the summer of 1986, the Soviets used large operations by helicopter commandos to try to eliminate the military leadership of the Supervisory Council of the North, then in Takhar Province. Despite close brushes with Soviet troops, the guerrilla commanders escaped and the Soviets withdrew after three weeks of fighting. War Varies by Region

This year -- while fighting in southern Afghanistan has often been intense -- Soviet-Afghan operations in the north have been notably more muted, said western analysts in Pakistan. "The Afghan Army's morale is now so low that the Soviets are being forced to pick up the slack," said one western diplomat. "But it seems the troops out on the ground are increasingly reluctant to do that."

Conspicuously, there has been a lack of air support for the string of Afghan Army garrisons overrun in the northeast, observers said. Reports from throughout Afghanistan in the past year have noted a drop in Soviet and Afghan government air operations since the mujaheddin began receiving U.S.-made Stinger and British Blowpipe antiaircraft missiles.

The biggest Soviet-Afghan joint operation in the north this year was a purely defensive exercise in September to relieve and resupply the beleaguered city of Feyzabad, provincial capital of Badakhshan.

Elsewhere in the country, levels of mujaheddin effectiveness and organization differ widely from region to region and group to group, western analysts noted. But this year the highest levels of fighting have been reported from the south and southeast, where Soviet and Kabul forces have launched major -- but largely unsuccessful -- offensives near Kandahar, Afghanistan's second city, and in the Jaji region of Paktia Province, close to the Pakistan border. {Soviet television reported Saturday a major offensive by the Afghan Army to lift a longstanding siege of Khost, a town in Paktia.}

But while reportedly cooperating more than in the past, resistance groups in the broad Pushtun belt of eastern, southeastern and southern Afghanistan remain split by tribal rivalries that often translate directly into party divisions. Analysts noted that the fragmentation has hindered larger military operations, and that despite these areas' proximity to Pakistan and short lines of supply, efforts to seize government garrisons, such as Khost, have failed repeatedly.

In the mostly nontribal, Persian-speaking west, an impressive degree of military organization has reportedly been achieved under Jamiat commander Ismail Khan in Herat Province. Soviet pressure on mujaheddin in the area often has been heavy this year, diplomatic sources said. But long supply lines from Pakistan and a less than supportive policy on the part of nearby Shia Moslem Iran toward the Sunni Moslem resistance in Afghanistan have been serious headaches for the Jamiat commander, analysts noted.

Anthony Davis is a freelance journalist based in Bangkok who has made four extended trips into Afghanistan and whose articles from Afghanistan appeared in The Washington Post in 1984 and 1985.