President Mohammed Zia ul-Haq's campaign of Islamization, which was intended to unify Pakistan under the cause for which the country was founded, is showing signs of having the opposite effect.

Sectarian rioting between the majority Sunni Moslems and the minority Shiite sect continued this week despite a severe curfew that was imposed in northern Karachi after disturbances that left an estimated 20 to 30 persons dead during the past week.

Meanwhile, clashes continued sporadically at universities here and in Lahore between rightist fundamentalist students and moderate Moslems. At Karachi University, which has been closed, members of the fundamentalist Islami Jamiat Tulaba organization were dispersed by tear gas on March 13 after they seized an administration building and hijacked two city buses to use as street barricades.

The militants have been demanding the release of one of their leaders who was arrested last year on charges of murdering a student leader of an opposition group.

The sectarian clashes have prompted demands for a debate in Zia's hand-picked Consultative Assembly, with some members claiming that the riots have been inspired by forces opposed to the martial-law government and with the opposition blaming the authorities.

The northern Karachi riots were sparked by a dispute over the construction of a Shiite imambara, or shrine, in a Sunni neighborhood on land that the Sunnis claimed had been allotted to them for a mosque. Several attempts reportedly were made to set fire to the shrine, and an estimated 5,000 Shiite demonstrators staged a sit-in on a main thoroughfare to protest the desecration.

The government claimed to have resolved the dispute by paying the Shiites, who comprise about 15 percent of the population, compensation and agreeing to use the plot for a neighborhood dispensary.

But the announcement of a compromise enraged working-class Sunnis, many of them living in Pathan settlements, and rioting erupted, which escalated last weekend. While the government's official casualty toll has been put at seven killed and 72 injured, unofficial sources said 20 to 30 persons have been killed, most of them in exchanges of gunfire between mobs.

Karachi security authorities said 213 persons have been arrested, including militant Shiite leaders, and that numerous revolvers, daggers and bottles of acid have been confiscated. The government imposed a 22-hour curfew and ordered censorship of accounts of the rioting.

Pakistani sources said, however, that the roots of the sectarian tension go deeper than the land dispute and involve accumulated rage stemming from long-standing differences between the two Moslem sects.

The breakaway Shiites venerate Ali, the son-in-law of the prophet Mohammed, as the vicar of Allah and adhere to his line of hereditary descent. The Sunnis regard Mohammed, who did not appoint a successor, as the only apostle of Allah.

Signs that Zia's crusade to transform Pakistan into an Islamic state was fomenting resentment began to surface with resistance by the Shiites to the zakat, or compulsory tithing scheme based on the Koran by which the government funds some social welfare programs. Shiites said their interpretation of the Koran is that zakat should be voluntary.

Further resentment stemming from Islamization has been fueled by the success of predominantly Sunni religious zealots in filling a vacuum created by the absence of democratic institutions and imposing their brand of Islam on all of the 60-odd minority sects in the country, according to some Pakistani political analysts.

A.T. Chaudhri, former editor of the Islamabad daily The Muslim, observed that the emergence of the new fundamentalist religious leadership is paving the way for a surge of sectarian conflicts in Pakistan.

"Unless the constitutional and political process is revived and democracy restored within a reasonable time frame, the national polity will be further fragmented. What is worse, various social forces may embark on direct action and put the country in the lap of anarchy--a free-for-all with no holds barred," Chaudhri warned.

A western diplomatic analyst with long experience monitoring the Pakistani political scene noted that since the sectarian violence flared, Zia has stopped talking about the possibility of resuming constitutional democracy in the next year or so.

"The sectarian troubles demonstrate how difficult it is to use Islamization as a unifying force. On the contrary, it has been divisive," he said. He added that Islamization is likely to be more trouble-free in a country like Egypt or Iran, with almost exclusive domination by one Moslem sect.

Moreover, the diplomat said, the polarization in Pakistan has been compounded by a growing resentment among Baluchis, Sinds and Pathans in the western regions over the Punjabi-controlled martial-law government in Islamabad.

Opposition sources here said they are convinced that even if Zia eventually does call for elections to replace the martial law he imposed after seizing power in 1977, the elections will be restricted so as to guarantee domination by a coalition of the present military government and rightist Moslem leaders.

Meanwhile, religious tension remains high here. Moderate Pakistanis say they are concerned that it may either spread to other cities or result in another major clash in Karachi with a large loss of life, resulting in a greater clampdown by the government.

If that happens, one moderate opposition activist said, the likelihood of any elections in Pakistan--tilted in favor of the martial-law government or not--will recede further.