Vowing to make "no encroachment on a man's right to polygamy," the Egyptian government passed a new law today recognizing certain basic rights for women.

The new legislation is a milestone for women here, but also demonstrates President Hosni Mubarak's desire to avoid a major confrontation with Egypt's Moslem fundamentalists.

Its passage comes in the face of growing political pressure from fundamentalists who have joined to demand that Islamic law, or the sharia, be strictly applied here.

In another development concerning the issue of Islamic law, the government today dismissed Sheik Hafez Salama who had tried to stage a march to demand the strict application of sharia. The government appointed another sheik for his mosque in the Cairo suburb of Kubbeh.

Because it touches on issues of family and deep tradition as well as religion, the law dealing with marriage is at the emotional center of this debate.

"For some of these sheiks," or religious leaders, said one American scholar here, "this issue is as emotional as the abortion question in the United States."

The main effect of today's action was to reinstate the law on marriage passed in 1979.

The 1979 law, decreed by then-president Anwar Sadat without the consent of parliament, was ruled unconstitutional two months ago. But public discontent with the law had been mounting for months.

Often called the "Jihan law," because it was pushed by Sadat's westernized wife, the 1979 law declared that polygamy was legally harmful to a first wife and automatically gave her the right to divorce her husband.

The wife also had the right under the 1979 law to keep custody of young children and the family dwelling after the divorce.

In Cairo, a city of at least 12 million people, each square foot of living space is valuable. The idea of giving up an inch of space in a divorce makes the whole issue of divorce extremely sensitive.

Until 1979 a man could divorce his wife by saying, simply, "I divorce you" three times. And he was under no legal compulsion to inform her of what he had done.

The 1979 law required that all divorces be legally registered and that the wife be informed.

When the 1979 law was repealed, however, these rights went out the window and the effective law was the one passed 50 years before.

"Medieval," is the way one woman intellectual described it. But there were many men and some women here who considered it appropriate in this society where religious fundamentalism is ever more conspicuous. Its provisions are closely linked to the standard interpretations of the sharia.

Today's action was criticized by many women activists, who had proposed new legislation. Shahida Baz of the Committee for the Defense of Women and Family, called the new law "a kind of avoidance," adding: "The government did not want to be accused of being anti-Islamic."

Yet even its liberal critics concede that from their perspective the new law could have been much worse.

"It wasn't the best," said Aziza Hussein, one of the most prominent activists for women's rights in Cairo. "But it is better than nothing."