The battle started with curses in Pushtoo imputing unnatural sex lives to the women in the family of Afghan President Hafizullah Amin, followed by the crackle of rifle fire from rebel tribesmen against the government garrison of Gardez, a town in Afghanistan six days from here by camel.

The Afghan troops in the garrison replied with similar obscenities against women in the rebels' families followed by volleys of fire from their Soviet-made automatic weapons. Forty minutes later on the moonlit night early this month, the Army's Soviet-supplied artillery began firing from the garrison at the rebel positions.

According to a tape recording of the battle brought here by a Pakistani journalist who had slipped over the border to cover the rebels, once the artillery started the cursing was replaced by the ancient Moslem prayer: Allah e akbar, God is great.

To observers here of the year-old rebellion by Moslem tribesmen against the Soviet-backed Afghan government, the most signiificant message of the tape was the long time -- 2 1/2 hours -- it took for the gunners in the garrison to zero in on the rebel positions.

"If the Soviets were firing the guns," commented one observer here, "NATO has nothing to worry about."

It is more likely, however, that all the fighting was done by Afghan soldiers. The targeting delay may mean the rebellion and political puges have resulted in poor training of the Army.

In the Gardez battle, which ended at about 3 a.m., seven rebels were killed and 17 were wounded -- all by artillery shells.

One of the wounded men showed up at a makeshift rebel hospital here with a shattered arm after being transported by camel for six days over mountain trails.

According to observers here, this battle is typical of the fighting throughout Afghanistan. Uncoordinated by any central rebel authorities, at least five distinct groups attack government garrisons scattered in remote areas of the Texas-sized country.

These battles keep the government troops bottled up in their outposts, supplied only by Soviet-made helicopters. The roads are unsafe.

Even major roads connecting the largest cities are considered unsafe for travel. Rebels continually ambush armed convoys between the capital of Kabul and the cities of Kandahar and Herat.

Kabul's main link to the outside world, the road through the Khyber Pass to Peshawar, is open most of the time. But rebels cut it for a few days last week as they dynamited three bridges.

But when the rebel groups are not fighting government troops they are battling each other -- sometimes over ideological differences but most often over what one observer here called the "lust for power and guns."

One striking example is being cited here has having shaken up the fighters all over eastern Afghanistan and perhaps for making it more difficult for Afghan Army officers to turn over their men and arms to the antigovernment forces.

In this incident, Abdul Rauf, commander of the Army garrison at Asmar, decided to switch sides, bringing with him 1,200 troops, their arms, two helicopters and the heads of the provincial governor and his top Soviet advisers who had been lured into the garrison and killed just before the defection.

Rauf was persuaded to join a rebel group headed by Burhanuddin Rabbani. But, sources here said, the fanatical Moslem group Hezbi-Islami attacked Rabbani's forces for the weapons.

A Hezbi-Islami official denied that a battle had taken place but acknowledged that Rauf had been relieved of any command responsibility. However, a third rebel group, the Islamic Nationalist Revolution Council, headed by Pir Sayed Ahmed Gailani, corroborated the earlier account.

Whatever the true details, said a source who has kept close track of the rebel rivalries, the main theme is true and illustrates how the differences prevent a unified push againt the Kabul government.

In August, according to a wide variety of sources here, a group of Saudi Arabian businessmen were reported to have offered millions of dollars in financing for the rebels if they could only unite. They formed a group, called the Treaty of Unity of Islam, but it broke up within weeks and the Saudi money never came.

The Hezbi-Islami group is the most radically Moslem and the hardest for the other groups to deal with, according to sources here.

Mangal Hussain, a spokesman for Hexbi-Islami who was educated as an agriculturist in Britain, said his group wants to turn Afghanistan into an Islamic state. If the Moslems seize power and the present government falls, "Quite honestly we will kill them." he said.

Gailani's Islamic Council, on the other hand, is more Western-oriented. Its spokesman, Gailani's nephew, Hossain Gailani, and Mohammed Akim, a U.S.-educated former Afghan diplomat who served at the United Nations, say they want to see "a modern Afghanistan."

"We are nationalistic," said Akim. "We believe in a modern Afghanistan. We believe in democracy. Other groups want to see a different Afghanistan, a backward Afghanistan."

Despite their rivalries, the rebel forces have been successful against the Afghan government, which controls less and less of the country.

"As individual groups, the rebels are making marginal progress," said one observer here. "But all over Afghanistan, more and more tribesmen have taken up arms against the government. Some do it because they oppose government attempts to control them, but other are doing it for pure banditry, which is a way of life in Afghanistan. They sense the government is weakening and are going for its weapons which they can sell."

With winter coming, the rebels will have a harder time. By all accounts here, they are short of food and many of the villages on the plains where the tribesmen spend the winters have been destroyed by government attacks.

With the onset of winter, refugees are streaming here from Afghanistan.

At last count, there were more than 200,000. Citing the different motivations of antigovernment forces, observers here, in Kabul and in Apkistan's capital of Islamabad question how much control the various rebel headquarters in Peshawar have over the fighting.

The rebels here insist they control the fighters. Hossain Gailani, for instance, said he is here just to get orders before finishing an attack on a garrison. But an observer here who has talked with fighters believe the relation is symbolic at best.

"Fighters do not take orders from any Peshawar groups," he said, "although they show respect to them."