When Afghanistan's government quietly enacted a sweeping law last month restricting the rights of minority Shiite women, few Afghans were aware of what it said.

KABUL, Afghanistan — When Afghanistan's government quietly enacted a sweeping law last month restricting the rights of minority Shiite women, few Afghans were aware of what it said. But since the law's contents became known here just over a week ago, it has provoked an extraordinary public debate on the once-taboo topic of religion and sex in this conservative Muslim nation and spurred an unprecedented protest by senior officials.

The law, which was approved by parliament and signed by President Hamid Karzai, codifies proper behavior for Shiite couples and families in the most intimate detail. It requires women to seek their husbands' permission to leave home, except for "culturally legitimate" purposes such as work or weddings, and to submit to their sexual demands unless ill or menstruating.

Initially seen as a political gesture to the country's Shiites, who make up 20 percent of the population and have long sought legal recognition of their religious beliefs, the law has become a political nightmare for a government struggling to balance conflicting pressures from traditional and modernizing forces at home and abroad.

Not only has the law been denounced by the major Western governments on which the poor, insurgent-plagued country depends for economic and military aid, but it has also spurred a formal protest by several cabinet members and more than 200 other Afghan leaders, who said it treats women as "objects" and could lead to a new "Talibanization" of Afghanistan.

"I could not keep silent any longer," said Foreign Minister Rangin Dadfar Spanta, one of the most prominent figures to sign the protest statement.

In an interview, Spanta said he remained loyal to Karzai but could not bear to see Afghan democracy and human rights come under continued assault from religious extremists. The Shiite law, he said, had a "totalitarian orientation that does not accept the difference between what is private and public. It identifies some Afghan citizens not as human beings but as slaves."

The law was approved after some debate and revisions, but Afghan human rights activists who reviewed the legislation in advance said most of their objections were ignored. They said a handful of conservative Shiite leaders pressured other legislators and Karzai into supporting it, on the grounds that the Shiite minority in this predominantly Sunni Muslim country deserved its own religious laws.

"That was supposed to be an achievement: to recognize Shias' legal rights so Hanafi (Sunni) laws would not be imposed on them," said Sima Samar, a Shiite woman who chairs the Afghan Independent Human Rights Commission. "But it was also used by a few leaders who want to put chains around half the population. It is good to have rules for marriage and divorce, but if I want my wife to wear pink lipstick and she wants to wear red, why should that be a matter of law?"

Conservative Shiite legislators and clerics who drafted and promoted the law have asserted that it protects women and guarantees wives ample rights, especially in areas such as child custody. They point out that several sections were modified after debate, loosening the restrictions on women leaving home and raising the minimum age for marriage.

But another group of more moderate Shiite scholars said they had urged numerous changes that were never made. Their central argument was that certain aspects of family life, especially marital relations, should be kept private. They also said that Shiite jurisprudence allows for flexibility and modification in keeping with societal evolution.

"Sexual relations should be between a husband and wife. If they can solve their problems, the government has no right to interfere," said Amin Ahmadi, president of a new Shiite college in Kabul, the capital. "Nothing we proposed was against Islamic Sharia, but in favor of human rights. There can be a more modern interpretation of these issues."

Ustad Mohaqiq, a legislator and leader of the Shiite Hazara ethnic group who visited Washington this week, strongly condemned the law, saying it was a "discriminatory and inhuman" version proposed by "radical clerics" and not a more moderate negotiated version that had been approved by the upper house. He said it was "in contradiction with human values common all over the world."

In addition to exposing differences among Shiite leaders, the controversy has also highlighted the conflicting pressures on Karzai, who is expected to run for reelection in August. The president is caught between the conservative senior clergy — both Sunni and Shiite — whose support he may need to win, and his Western backers, which promptly condemned the new law.

"I've expressed my concerns and objections about this law directly to President Karzai, and our president, President Obama, has spoken about the fact it truly is not in keeping with the direction that Afghanistan has been following," Secretary of State Hillary Rodham Clinton said this week.

Several other Western governments, NATO and the United Nations expressed similar outrage.

Sources said Karzai was stunned by the foreign criticism. He has now promised to have the law thoroughly reviewed and to change any aspect that conflicts with the 2004 Afghan constitution, which endorses women's rights. The law is not yet being enforced, although Shiite clerical instructions follow its basic tenets.

Meanwhile, the international outcry has prompted a nationwide discussion among Shiite and Sunni Afghans, mostly via call-in radio shows, about the long-taboo topics of sex and religion.

Both the dominant Sunnis and the minority Shiites espouse strong male authority over the family. But Shiites, who are mostly ethnic Hazaras, are considered more progressive than Sunnis, especially the ethnic Pashtun group that spawned the repressive Taliban movement in the 1990s.

In the flurry of debate, some Afghan men have expressed concern that women might be tempted to have affairs if they are allowed out in public or have expressed outrage at what they see as foreign interference in their religious beliefs. But some women, especially those from an emerging, better-educated generation, have seized the opportunity to express their views on the need for more women's rights within Islam.

One is Habiba Saddiqi, 23, an engineering student who has collaborated closely with UNIFEM, the U.N. women's organization that has a large program in Kabul and was among the first groups to raise alarms about the Shiite law. Saddiqi, who is Shiite, said she and her friends had collected thousands of signatures in the past week, calling for a more moderate version of the law.

"We need such a law, but it should be a democratic one," she said. "This law is made by men for their benefit. If a father can order a daughter to marry whomever he likes, it means she has no rights. That is not good for women, and it is not good for society."