President Mohammed Zia ul-Haq's effort to turn Pakistan into a nation governed fully by Islamic law as set down by the Koran has, in many ways, become a divisive rather than a unifying force for the country.

The divisions in this intensely religious nation of 74 million people are between the majority Sunni and minority Shiite Moslems, whose varying interpretations of what the Koran says have led to bloodshed in the past.

It is not the general aim of Islamization, but rather specific differences over laws Zia is attempting to promulgate, that have brought the two sects to sword's point once again and thwarted many of Zia's efforts during the past 4 1/2 years.

There is no exact count of the number of Shiites in overwhelmingly Moslem Pakistan; estimates range from as low as 10 percent to as high as 30 percent. "You can take your choice," said one expert on Pakistan.

At a little Shiite mosque here in Karachi last week, part of the toll of a recent incident was still visible. Windows were broken and workmen were repairing the marble fountain on the side portico. But the interior had been cleaned up and there were no longer any signs of what bystanders said was the shocking desecration of a Koran, which had been burned and strewn across the mosque floor by the raiders.

"It is the Moslem people who did it," said one of the hangers-on, a Shiite who regularly attends the mosque, which was attacked earlier this month on the day celebrated throughout the Islamic world as the Prophet Mohammed's birthday.

Although Zia's martial-law government issued no explanation for the attack, it is widely believed by Pakistani journalists and diplomats here and in the capital city of Islamabad to have been carried out by a gang of Sunnis.

The attack vividly illustrates the problems Zia has encountered on the road to converting Pakistan into a truly Islamic nation. In aggregate, his effort involves turning the Western style of democracy inherited from the British into a new, still undefined form of Islamic democracy; establishing a shariat, or Islamic legal system, and making sure that all of Pakistan's criminal and civil laws conform to the spirit of Islam; shifting to an interest-free banking system; adapting the present Westernized education system to an Islamic model, which includes separate universities for men and women; an emphasis on the use of the Arabic and Urdu languages over English.

But while Islamization generally appears to enjoy widespread support from a vast majority of Pakistan's people, it breaks down into sectarian strains between Sunnis and Shiites when Zia tries to lay down specific laws, such as the Islamic penalty of removing the right hand of convicted robbers or the compulsory collection of a wealth tax for charity.

"You cannot have Islamization," observed a Western diplomat who has served in a number of Islamic nations, "when you cannot agree what it means."

Some of the Westernized Pakistanis, moreover, question whether this country was founded by Mohammed Ali Jinnah to be a theocratic state or a secular homeland for South Asian Moslems who did not want to live in a Hindu-dominated India.

With or without the growth of Islamization, the traditional Shiite-Sunni rivalry seems most volatile here in Karachi, Pakistan's largest city and the commercial hub of the country.

While Shiites are spread throughout Pakistan, Karachi is a flash point because of its size and the large number of Moslems who migrated from India at the time of the 1947 partition.

Until then, according to a well-informed Pakistani journalist, a spirit of tolerance had existed between the different sects in the part of India that became Pakistan. The founder of Pakistan, Jinnah, and other early leaders were Shiites. Zia, however, is a Sunni.

The two sects did not get on as well in other Indian states, especially in Uttar Pradesh, where there were frequent Sunni-Shiite clashes. The migrating Moslems from India brought that friction with them, and the situation is reported to have deteriorated here during the past three decades.

Moreover, Sunnis appear to be jealous of the Shiites' financial talents. Shiites control many major businesses and much property in Karachi.

One demonstration of this jealousy came last November, on the holy day of Moharram, when a pitched battle between Sunnis and Shiites broke out after a Shiite procession was pelted with sandals while passing through a Sunni slum neighborhood near the port.

Three persons died, and, according to a resident who visited the area of the violence, at least 21 cars were destroyed and three buildings burned.

"It looked like a war zone," he said.

There is no real explanation for the violence in November. Nor is there any for the attack this month on the Shiite mosque, although some Pakistani journalists believe the religious sects may be egged on by politicians trying to embarrass the Zia government.

But the violence here is only the most visible aspect of a continuing battle between Shiites and Sunnis that has caused Zia to compromise on many elements of his Islamization program.

He was forced, for instance, to back down on the compulsory collection of a tax on wealth to aid the poor after thousands of Shiites staged a protest march on government offices in Islamabad.

Many observers believe Zia's government came within a hair's breadth of being toppled then and would have fallen had he not given in, averting a clash that could have led to bloodshed and deaths.

As a result of that protest, the government will not take the 2 1/2 percent wealth tax from anyone who states he believes in the Fiqah Gafar school of Islamic law favored by the Shiites. This school says charitable contributions must be given voluntarily to follow the Koran.

An earlier Shiite-Sunni clash erupted after Zia ordered the Islamic punishment of cutting off the right hand of persons convicted of robbery. Sunnis believe that the hand should be cut off at the wrist while the Shiites say it should be amputated at the base of the fingers.

If the Shiites hold sway, the convicted criminal would still be able to dip the stump of his right hand into the communal food bowl while the Sunni method effectively bars him from taking meals with other persons since using the left hand for eating is culturally offensive.

Although the Islamic punishment for robbery was approved by Zia's government three years ago, no limbs have been severed.

This is partially because of the dispute between the two sects, during which the Shiites appealed to Ayatollah Ruhollah Khomeini, the religious and political leader of the neighboring--and overwhelmingly Shiite--nation of Iran, and partially because no Pakistani doctor is believed willing to perform the surgical amputation Zia's law requires.

Furthermore, although an 18-year-old high school student and the 24-year-old bus driver with whom she ran away were sentenced last September to lashing and then death by stoning, the penalty has not been enforced by the government yet.

Where the government has been more successful in imposing what it considers the proper Islamic morality are areas concerning the modesty of women and codes of dress.

It forced the cancellation of a trip by the Pakistani women's field hockey team to an Asian tournament in Japan because men would be permitted to watch the games.

There also have been government moves to limit the use of female models in newspaper and television ads.

Zia has ordered all government officials except Army officers to abandon the coat and tie that they inherited from the British in favor of the simpler national dress of a thigh-length pullover shirt and baggy trousers--or the more formal high buttoned sherwani tunic.

While this was done as much to forge national unity as for religious reasons, it has drawn complaints from civil servants who now have to buy a new wardrobe.

Zia's ban on alcoholic beverages extends even to heavily advertised international flights of Pakistan International Airlines, which competes for passengers with airlines that serve drinks.

Westernized Pakistanis continue to drink in the privacy of their homes, although they now pay a high price for bootleg whiskey.

But Islamization appears to have a strong hold on the mass of Pakistanis who believe in the puritanical morality it imposes.

Part of the difficulty for Zia lies in the fact that he has no real model to follow. The more than 40 predominantly Moslem nations that make up the Islamic Conference, for example, vary widely in their governments and economic systems.

The two other nations besides Pakistan that are trying to forge governments based on the Koran, predominantly Shiite Iran and Sunni Saudi Arabia, are following different paths that frequently lead them into religious and secular conflicts.

Zia, therefore, is breaking new ground, and if he is to succeed he will have to pave over centuries-old schisms that divide the world's 600 million Moslems.