Seated in rows on the dried mud floor of the village mosque, the young boys of Babra Khel shouted their lessons. The high-pitched cacophony stunned the ears.

The boys, between 6 and 12, read texts that were designed to teach them Persian and stressed the themes of jihad, or holy war. Hamdullah, a benign-looking mullah, sat at the front of the room, where boys occasionally came for help with difficult passages.

Here and in similar village schools throughout Afghanistan, the resistance forces fight the cultural war. "We must teach the children the Moslem way of thought," Hamdullah said. "Only this will help them resist Soviet propaganda."

Like their military battle against the better equipped Soviets, the resistance movement's educational campaign must be fought guerrilla style: in small-scale operations with few material resources. One of the resistance commanders in Wardak Province, Amin Wardak, can send only a few books and supplies for the 16 boys of Babra Khel. Girls traditionally are not sent to school in Afghanistan.

As some resistance leaders concede, the education is often not even basic. When they leave the schools to begin training at a guerrilla base, rural Afghan boys may not yet be able to read.

The response of the guerrillas to Sovietization also has been splintered by cultural differences that emerged as Afghanistan's elite began to encounter western-style modernism early in the century. These differences are now reflected in the resistance movement, especially at its top.

Some of the resistance leadership springs from the same small, westernized, largely urban class that spawned Afghanistan's communist leadership. Such men, often educated by foreign teachers in Kabul's western-style schools, generally favor more secular and technical education to improve the resistance movement's ability to handle both sophisticated weapons and civil administration.

But many fundamentalist Moslem Afghans, regarding their faith -- rather than technical skills -- as the key to victory, argue for an almost exclusive emphasis on religious training.

"It was, after all, a lack of religious training that enabled the communists to take over in Afghanistan," said Mohammed Salim, a press officer of the Hezb-i-Islami (Islamic Party) led by Gulbuddin Hekmatyar.

"We will be able to teach the physical and natural sciences after the liberation of our country," Salim said, "but for the jihad, we must study Islam."

The Afghan political parties based in Peshawar, Pakistan, each with its own education committee, fight bitterly over religious issues in education.

"We're trying to write a science textbook, and we can't even discuss the structure of matter, or decide whether to have pictures in the book," said Stephen Keller, an American professor helping to design education programs for Afghans. "Some of these guys are saying it's un-Islamic," he said.

Alongside the disagreement over how to combine religious tradition and western modernism, Afghanistan shares a problem of many Third World countries whose borders were drawn by colonial powers: the lack of a uniform culture. Before the Soviet invasion, American anthropologist Louis Dupree identified 21 distinct ethnic groups, speaking numerous languages and dialects, in Afghanistan.

Much of Afghanistan's indigenous elite is not even in the fight to build and keep its own cultural identity. Prof. Sayed Majrooh ticked off a long list of former colleagues who were killed or imprisoned soon after the first Afghan communist government came to power in April 1978.

The Soviets and the Afghan communists "wanted to eliminate anyone who could have built an alternative cultural model to their own for Afghanistan," Majrooh said.

Even among the survivors, many of Afghanistan's educated elite are scattered through Europe and North America, and remain reluctant to help the resistance in Pakistan or Afghanistan -- partially because of the political bickering among the Afghan parties, according to several Afghan intellectuals in Pakistan.

Not only the Afghans and the Soviets, but conservative Arabs and Iranians seem involved in the battle for Afghanistan's future identity. A number of Afghan intellectuals and resistance commanders complained that, in the rivalries among the Afghan parties, Arabs and Iranians are favoring fundamentalist Afghan leaders whose political line they approve.

In addition to discreet official aid from Arab governments, wealthy Arab businessmen give cash to pay for arms and supplies, and their transportation into Afghanistan, but several commanders said the Arab donors pressure the Afghans to adopt fundamentalist practices.

"The Arabs are using their aid to promote, in Afghanistan, their own interpretations of Islam," Wardak said.

The Afghan elite, which lived in Kabul before the war, had strong cultural links with European countries, notably France. One exiled Afghan academic said this part of the resistance leadership worries about the cultural effects of the Arab aid: "They are trying to break our ties with the West," he said.

Fundamentalist Arabs working with the Afghan resistance denied that there was any organized Arab pressure, and argued that Afghans themselves are choosing to limit their contacts with the West. Iran reportedly tries to exert its own influence on the Afghan resistance through its domination of ethnic Hazara factions in the center of the country. The Hazaras, a Shiite Moslem minority in predominantly Sunni Moslem Afghanistan, long have had close links with Iran.

The central Hazarajat region is controlled mainly by two groups that identify with Iranian leader Ayatollah Ruhollah Khomeini and that long have fought more against the traditional Hazara leadership than against the Soviets. A Hazara commander of the traditionalist Shoura faction said his group has captured Iranians fighting within the pro-Khomeini Sepah and Nasr factions.

Last summer, a senior Iranian, Ayatollah Hossein Ali Montazeri, hosted a meeting of six Afghan Shiite factions, directing them to unify against the Soviets instead of fighting other resistance groups.

It is not only the Islamic loyalties of the Afghans that are being fought over in this war. The Afghan resistance forces explain proudly that they are campaigning actively for an Islamic revival in the Moslem Soviet republics north of their border.

In the rhetoric of the jihad, the struggle is not for the liberation of Afghanistan, but for the elimination of Soviet atheistic rule over all Moslem lands. The Soviets' "inevitable retreat from Moslem Asia will begin with its military defeat at the hands of the Afghan resistance forces," senior commander Jalaluddin Haqqani declared in an interview with a Pakistani magazine.

Matthew Erulkar, a former pro-resistance lobbyist in Washington who is now organizing a private aid program for the rebels, explained in Pakistan last month how he had visited the Afghan-Soviet border in Kunduz Province with guerrillas who, he said, run a cross-border missionary campaign.

"A couple of times each week, they would go to the border to give Korans and religious pamphlets to Soviet Tajiks who would come to meet them," Erulkar said.

"For them, this was the most important thing they did," he said. "They would walk around singing songs about liberating Tajikistan and Uzbekistan and Kazakhstan."