Nepal's government has enacted a new law aimed at stopping the practice of forcing a woman who is menstruating, or has just given birth, to sleep outside their home, in a hut or shed.

According to the law, any family member who forces a woman to practice "chaupadi" — the Nepali term used for menstrual isolation — can be punished with a jail sentence of 3 months and/or a fine of 3,000 rupees (about $30).

Toyam Raya, spokesperson for the Ministry of Women, Children and Social Welfare, told NPR that the new law will be implemented within a week.

The change comes in the wake of the highly publicized deaths of three women practicing chaupadi in the last ten months. Opponents of the practice celebrate the bill, which passed in parliament on Wednesday, as a legal victory showing the government now takes the issue seriously. But some women's rights activists question whether law enforcement can change deeply held beliefs. And there are questions about how the law will be enforced.

Chaupadi, which has roots in Hindu scriptures, is practiced in some communities due to the belief that menstruating women can cause bad luck, like illness in the family or crop failure. Chaupadi can take various forms but often means women and girls sleep in sheds outside the house, which exposes them to dangers. An 18-year-old died from a snakebite while staying in one of the sheds last month. A 15-year-old girl died from smoke inhalation after lighting a fire to warm the shed in December. The month before a young woman died of undetermined causes while staying in a chaupadi shed.

Nepal's Supreme Court actually banned the practice in 2005. But without any mechanism to enforce the ban, chaupadi has proved hard to stamp out.

"Chaupadi didn't end, because there was no law to punish people even after the Supreme Court outlawed the practice," Krishna Bhakta Pokhrel, a lawmaker involved with drafting the new bill, told The Himalayan Times.

A 2010 government study found 19 percent of Nepali women practiced chaupadi, but the figure was nearly 50 percent in the mid- and far-west of the country. As late as this year, 60 percent of people in one western region didn't even know the practice was illegal, according to a study conducted by two non-governmental organizations.

The new law is part of a series of bills formulated to replace the country's old criminal code, the Muluki Ain. The changes are an effort to integrate modern and traditional laws, the Kathmandu Post reports. Another law sets a one-to-two-year jail sentence and a fine of 10,000 to 20,000 rupees for tampering with a photo, motivated by concern among politicians for the use of their images on social media.

The anti-chapaudi initiative will have another component. Raya says local police will be tasked with destroying the sheds and making sure families don't rebuild them. That's a tactic the police have tried in the past, including after one of the deaths last year.

But it is unclear how the police will proceed with this task. Destroying sheds may prove difficult, as the multipurpose sheds are sometimes used for storage and keeping animals.

If a woman chooses to practice chaupadi, Raya says she will only be allowed to do so by staying in a separate room inside the house.

As for the penalties, a woman would in theory have to complain to the police, or someone would have to on her behalf. That would mean that a woman would likely have to file a complaint against a family member.

Raya previously told NPR law enforcement would not end chaupadi because of its long history of practice. He now says the new consequences will deter people: "Of course chaupadi will be reduced now. Once this law is in place people will be forced to follow it, and they will be scared of the punishment if they don't."

Not everyone is convinced the new law will work.

"It's a fallacy that it's men who make the woman do this. Yes Nepal's patriarchal society plays a part, but it's the women who make themselves follow chaupadi," local women's rights activist Pema Lhaki told the AFP news agency.

Lhaki says strategic interventions aimed at the root causes of chaupadi are needed. But even still, she says, it will likely come down to waiting a generation for change.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.