Afghanistan's Soviet-supported puppet government under Babrak Karmal now appears to face a greater threat from a popular urban insurgency than from the politically divided Islamic guerrilla groups that have become the focus of aid efforts by outsiders, including possibly the Central Intelligence Agency.

The rash of anti-Soviet demonstrations and the general strike that have catapulted the citizens of Kabul into the forefront of the opposition of Afghanistan's communist authorities in recent days indicate a greater degree of organization and unity than the guerrillas have yet been able to muster.

The main Pakistan-based Afghan rebel groups, most of which subscribe to the kind of uncompromising Islamic fundamentalism advanced by Iran's Ayatollah Ruhollah Khomeini, are so fragmented and uncoordinated that the CIA and other aid donors face a dilemma in trying to decide whom to help, and what results to expect from that help.

To attack a given target inside Afghanistan, these groups must often negotiate their way into an area controlled by one of the more than 60 other rebel groups estimated to be operating throughout the country.

The most prominent rebel groups have only a facade of unity. And they appear to have had no major active following in Kabul, where protests are rocking the government installed in a Dec. 27 Soviet-engineered coup.

While the Kabul protests undoubtedly serve the rebel groups' aims, it is doubtful that any of them were actually involved in organizing the actions.

In fact, interviews in Afghanistan and Pakistan last month with local and foreign officials and with Afghan rebel spokesmen and refugees indicated that the various established rebel groups often have little, if any, control over guerrilla activities in the Afghan provinces. Much of the insurgency there evidently consists of spontaneous uprisings against the government by small, local bands.

Reliable sources have said the CIA has begun supplying weapons -- mostly Soviet-made small arms and simple antitank guns -- to Afghan rebel forces, although it is not known precisely to which groups or tribes these arms are going.

The weapons will certainly be welcomed. Many Afghan refugees interviewed in Pakistan recently complained that they lacked enough guns and ammunition to carry on their battle against Soviet and Afghan government troops and needed modern arms.

For U.S. policymakers trying to decide whether and how to meet such appeals, however, the plurality of groups and their dubious followings make covert arms supply operations' a risky venture with uncertain returns.

An Afghan government report last year identified no fewer than 64 semi-independent rebel groups in the country.

"Whom do you help?" a Western diplomat in Kabul asked last month shortly after the coup and invasion gave the dilemma new urgency.

Among the choices are eight relatively organized rebel groups based at Peshawar in western Pakistan about 25 miles from the Afghan border post on the road to Kabul through the Khyber Pass and the Kabul Gorge.

Of these, six are considered to be serious guerrilla groups with at least some fighting capability in Afghanistan. All espouse Islamic ideologies, with varying degrees of religious zeal.

So far these six groups have fashioned only a superficial unity, presenting themselves as the United Islamic Liberation Front of Afghanistan at last month's Islamic Conference in Pakistan to improve their prospects of attracting Arab oil money and weapons.

However, the groups still have no unified forces or command and remain split by political differences in their Islamic approaches to government, class and family connections and personality clashes among their leaders.

Among the six main rebel leaders are the former Afghan director of an Islamic institute in Copenhagen, the wealthy owner of a big automobile dealership in Kabul and a 34-year-old former engineering student at Kabul University.

The latter, Gulbuddin Hekmatyar, heads what is probably the largest and best organized of the various groups, the Hezbi Islami, or Islamic Party of Afghanistan. It is also the most extreme Moslem fundamentalist group, with a published program calling for Moslem women to be veiled in public and "an open public resistance to un-Islamic ideas and practices."

A little green booklet outlining the party's aims also calls for separate education for girls, a "national uniform for state officials as against western dress" and a ban on "drinking, adultery, obscenity, gambling and other immoral practices."

These proposals do not always go over too well in the Afghan capital, where many opponents of the government are somewhat more cosmopolitan Afghans who want a democratic government free of foreign domination.

Two other rebel leaders based in Peshawar have better religious credentials than Hekmatyar and may have bigger personal followings among tribesmen in Afghanistan. But they are understood to be more influenced by Western democratic ideals.

One is Seyed Ahmad Gailani, the leader of the United Islamic National Revolutionary Council of Afghanistan.The other, Sibghatullah Mujaddedi, heads the Afghan National Liberation Front.

Both men hold the hereditary religious title of Pir, a kind of Moslem saint, and command great respect in their home areas.

However, Gailani's religious credentials reportedly have been tarnished somewhat by his preoccupation before the Communist takeover with his Peugeot dealership in Kabul. Gailani also has been accused of having close ties with Afghanistan's former monarch, King Zahir Shah, who was ousted by some of the rebel leaders, notably Hekmatyar.

Mujaddedi, the nephew of a leading religious figure, the Hazrat of Shor Bazar, formed his rebel group in July 1978 in Copenhagen, where he was living in exile after having been jailed under the government of President Mohammed Daoud. Daoud, who had overthrown the monarchy in 1973, was killed in the April 1978 coup that brought a succession of Communist governments to power in Kabul.

Two smaller guerrilla groups include the Jamiati Islami led by Burhanuddin Rabbani and the Harkati Engelabi Islami headed by Mohammed Nabi. Rabbani, a former professor in Kabul, was chosen as the representative of the united front that attended the recent Islamic Conference in the Pakistani capital. Nabi holds the Moslem religious title of maulvi.

Probably the most effective rebel organization, according to analysts in Pakistan, is an offshoot of the Hezbi Islami led by an energetic mullah named Younis Khalis.

"He's the most credible as a guerrilla because he actually fights on the other side (of the border)," one Pakistan-based diplomat said. Analysts believe Khalis has been responsible for much of the recent fighting around the city of Jalalabad in eastern Afghanistan, especially in his home area of Kugiani southwest of the city. But he is said to have no following outside the area.

Khalis formed his breakaway Islamic Party faction when he refused to go along with a short-lived coalition formed last April by Hekmatyar, Rabbani and Mujaddedi. Ironically -- and perhaps typical of the vagaries of the different groups -- Khalis later entered into unification discussions himself with Habi, Mujaddedi and Rabbani.

While some rebels operating in eastern Afghanistan near the Pakistani border have claimed to be allied to one or another of the exile groups, these organizations evidently have little or nothing to do with insurgents in central, western or northern Afghanistan.

When they do try to organize a guerrilla operation in Afghanistan, Western analysts say, most of the groups deal with local tribal leaders.

For example, if a group wants to blow up a bridge or attack some other target, it will send a representative overland across the border to find the area's tribal chief and persuade him to carry out the task, the sources say.The local leader in turn usually demands some kind of recompense -- guns, money or food -- and may play one exile group against the other to get the best possible deal.

The insurgency in such cases thus becomes guerrilla war by negotiation, the analysts say.

Another potential pitfall for anyone trying to decide whom to aid in the current struggle is a proliferation of less than reputable characters purporting to be guerrilla leaders with sizeable followings.

One Afghan recently arrived at a diplomat's office in Pakistan with a number of large plastic sacks containing petitions that he claimed showed the affiliation of 8 million Afghans -- about two thirds of the population -- to a royalist party he had formed.

On the petitions where a seemingly interminable series of thumbprints representing the signatures of illiterate Afghans.

"But you didn't have to be an expert to see that the thumbprints all belonged to the same guy," the diplomat said.