While the immediate target of the rampaging mob that gathered in Islamabad Wednesday was the U.S. Embassy -- which was gutted -- the belief is growing here that there could be other casualties.

The slow response of the martial law government of President Mohammed Zia ul-Haq was prompted, many observers think, by the president's realization of the explosive potential of any official response and the threat that would pose to his own increasingly troubled rule.

Zia's concern, in the face of clearly profound Islamic feeling among his own people, is reflected in his support for Iran and its militant Moslem leaders. Their fundamentalist fervor appears to have tapped a deep lode of poltical and religious support in other Moslem countries.

Zia's latest gesture to Iran was a letter to U.N. Secretary General Kurt Waldheim in support in Tehran's request for an immediate meeting of the U.N. Security Council to deal with the hostage impasse there and Iran's demand for the extradition of the deposed Shah Mohammad Reza Pahlavi.

"The government of the Islamic Republic of Pakistan has been following with mounting anxiety the rising tension between the United States and Iran," Zia's note said.

Today's Pakistani statement said that as a brotherly neighbor of Iran, Pakistan could not "remain indifferent" to the prospect of force being used by the United States.

"We are deeply disturbed," Zia's letter said, "over the possibility of the use of force against Iran to resolve the question of the release of hostages being held by Iranian revolutionary students or by way of punitive action against the Iranian people."

At the same time that he is grappling with the Islamic tide unleashed by Iran's revolutionary leader, Ayatollah Rhollah Khomeini, both within and beyond Iran's borders, Zia is attempting to improve Pakistan's relations with Washington, at a low point well before last week's embassy attack, in which two Americans died.

This effort, however, could well be stymied by the distinctly anti-western tinge infusing the fervor of his Moslem countrymen.

This anti-western bias is becoming a matter of considerable concern to Western diplomats in Pakistan in addition to the U.S. community.

Many diplomats here believe Zia's government had to think long and hard last Wednesday before sending Army troops in against the mob -- which started with students but then swelled with the addition of what one observer called "Pakistani junglies" from Rawalpindi.

"Zia had troubles," said one non-Western diplomat here. "He had to walk a thin line between keeping order and not angering the students."

Beyond that, the mob -- which included Quadi-i-Azam University students primed by leaflets distributed the day before telling them to get ready for new strategies in the anti-American struggle -- had picked an unassailable issue. They were enraged by false rumors that Americans were involved in the invasion of the Great Mosque in Mecca, and no political leader in Pakistan could oppose demonstrating in defense of an Islamic holy place.

Some observers said Wednesday's violence also served as a safety valve for pent-up emotions of the Pakistani people, who had not been allowed by the Zia government to protest the execution of former president Zulfiqar Ali Bhutto in April and the canceling of elections last month.

Most of the coverage in the press here has downplayed the embassy burning -- in one instance calling it "vandalism."

The United States has gone along with this. There have been no formal American complaints about the amount of time it took to get enough troops to drive the mob from the embassy, even though the heads of 50 diplomatic missions met here yesterday to draw up a letter to Zia detailing their own security fears.

As far as the militantly islamic students at the university are concerned, the burning of the embassy was justified because it was "a spontaneous reaction to religious sentiments," said Khalid Khan, 25, the secretary of the student union.

"We regret only the loss of life, not the action. We still believed the Jewish lobby in the United States is involved in the situation at Mecca," continued Khan, who belongs to Jamaat-i-Tulaba, the student wing of the fundmentalist Islamic Jamaat-Islamic political party.

The university is a hotbed of politics. Besides the Jamaat-i-Tulaba, which won the student elections recently, there are three other factions. One connected with Bhutto's Pakistan People's Party has forged ties with the students and passed out the broadsheets promising new anit-American strategies.

While Zia to tuen Pakistan into a truly Islamic state and already has banned alchol and instituted some Islamic laws, Iran and its new form of aggressively militant Islam has provided a new focus for Moslem students. Observers here note a renewed religious pride akin to the "black pride" movement that swept blacks on American college campuses a decade ago.

Khan, talking about burning the embassy, brought back memories of the black power slogan, "Burn, baby, burn."

Many observers believe there were forces beyond Iran and religion that brought about the violence Wednesday. One diplomat called them "subversive elements" and another suggested that Zia's political opponents, especially members of Bhutto's party who are not in jail, joined the mob in an attempt to discredit the government.

The government today announced that 15 "ringleaders" have been arrested for the destruction of the embassay.

While Pakistan's government earlier had appealed to Khomeini to give up the hostages in the embassy in Tehran, residents here and in Rawalpindi report that large numbers of Pakistanis are glad to see Iran assert itself as an Islamic state against United States. Embassies here are clearly worried about a larger assault on all foreign establishments -- including diplomatic missions -- if the United States takes military action.

"What's going to happen in Pakistan? The key is Iran," said one diplomat here.

This new Islamic fervor has a clear anti-Western flavor to it. One Pakistan newsman touring the places burned out by the mob last week, commented, "They're all white."

"Where religion is concerned, this country has often shown violence," U.S. Ambassador Arthur W. Hummel said.

He added, "There have often been tensions between different Moslem groups. So far as I know this is the first time religious tensions have been directed at Westerner's.