CAIRO, NOV. 12 -- A ranking security officer and one of his undercover agents were wounded in a gun battle the other day when they tried to arrest Moslem extremists haranguing students at a technical school in Assiyut.

Farther south, in Qana, two security officers were stabbed when they tried to move in on Moslem extremists at the high school. And in Beni Sweif, police arrested 67 Moslem extremists after a clash in which youths threw molotov cocktails and set a police vehicle ablaze.

The Interior Ministry, which reported these incidents and a number of others, has launched a broad crackdown on Islamic movements in Cairo and around the country since the assassination Oct. 12 of the speaker of parliament, Rifaat Mahgoub. To the consternation of President Hosni Mubarak's government, security forces combing through the society have found several armed extremist cells hostile to Mubarak's Western-oriented rule.

Egyptian officials, who first suggested that Palestinian terrorists sent by Iraq had carried out the assassination, have now learned that Egypt's own Islamic extremists murdered Mahgoub in an elaborately planned but botched ambush intended for Interior Minister Mohammed Abdul-Halim Mousa, according to reports here. Mousa was targeted, an informed Egyptian source said, to avenge the killing last summer of a fundamentalist leader, Ala Mohieddin, attributed by extremists to government security forces.

This is a particularly sensitive time for such security concerns, even though they are internal, since they touch on Egypt's delicate balance between Arab nationalism and Islamic piety, on the one hand, and friendship with Israel and the West on the other. Since August, Mubarak has dispatched 14,000 troops to Saudi Arabia as part of the U.S.-led multinational force arrayed against Iraqi President Saddam Hussein.

Mubarak has dismissed Saddam's charge that infidel U.S. soldiers in Saudi Arabia are defiling Mecca, Islam's holiest site, and challenging pan-Arab aspirations while ignoring the plight of Palestinians under Israeli occupation. But for Moslem extremists here and elsewhere, these themes traditionally have been touchstones, and they are being discussed these days in the streets of Cairo.

Intent on encouraging the discussion, Islamic fundamentalists near Beni Sweif stockpiled large quantities of leaflets denouncing Mubarak's policy in the gulf, it was reported Sunday. Police told reporters in Cairo the leaflet supply was discovered in an apartment Saturday after authorities arrested several fundamentalists handing some out in the streets.

"It's true that what Saddam did was something awful, but all those foreign forces there, it's not good," declared a fundamentalist science student at the University of Cairo. "It is an Arab problem, and it should be solved among the Arabs."

The existence of Moslem fundamentalists has been well known in Egypt. A half-dozen churches were burned last spring in Minya and Assiyut, in Upper Egypt. Police regularly report run-ins with extremist groups, generally described as adherents of a loosely connected umbrella organization called Jihad.

But discovery over the past month that some of the underground Jihad groups stockpiled arms, explosives and money and tried to organize military training with subversion in mind has set off alarms in a country whose previous president, Anwar Sadat, was assassinated in October 1981 by Islamic extremists within the armed forces.

"We have an organization that has been able to persist underground over the last 10 years, and the efforts of security forces during that period have not finished with it or removed its danger from the country," complained Ibrahim Nafie, editor of Cairo's semiofficial Al Ahram newspaper, in a front-page commentary last week.

A senior Western diplomat said Islamic subversion, while a concern here, reflects the views of a relatively small portion of Egypt's 50 million inhabitants. The most troubling question is whether those views have seeped into the largely closed world of the armed forces again, he added, recalling the Sadat assassination.

According to one Egyptian source, security forces have arrested at least 2,000 people since the Mahgoub assassination in the search for extremist cells. Other estimates have put the number at about 1,000, primarily men with records of previous arrests at the time of the Sadat killing or since.

In any case, many are believed to have been released after a few days of interrogation. The Interior Ministry, which has made regular reports on clashes and arrests but not announced the total of those detained, has restricted Egyptian newspapers to official news on the investigations.

Amnesty International, the human rights monitoring group, charged Oct. 17 that Egyptian authorities last year carried out "arbitrary detention and torture," particularly against Islamic fundamentalists, under state of emergency legislation.

The government denied Amnesty's charges but opposition political parties have vowed to boycott coming legislative elections, saying they cannot be carried out fairly under the emergency laws.

Mousa said his forces got confessions about the killing of Mahgoub from Jihad extremists arrested Oct. 26 in raids in Cairo and outlying villages.

After interrogations, police found two motorcycles used in the Mahgoub assassination and 900 pounds of explosives in a Cairo apartment, the minister said. Information from the same prisoners, he said, enabled police to surprise a meeting the next day of two Jihad cells at Cairo University's engineering department. Two Jihad members were killed when the extremists drew sidearms, police reported.