VANCOUVER - The husbands and wives in the isolated polygamous commune of Bountiful, B.C., are about to learn whether the 121-year-old law that has overshadowed their lives violates their religious freedoms.

A British Columbia judge will rule Wednesday whether Canada's anti-polygamy law is consistent with the Charter of Rights and Freedoms. It's a case that will almost certainly be appealed to the Supreme Court of Canada.

The court was asked to weigh the constitutionality of the Criminal Code section banning polygamy after the failed prosecution of two religious leaders in Bountiful, where residents believe multiple marriage will allow them to reach the highest level of heaven.

The hearings included testimony from academic experts, former polygamist women and current plural wives. The case has focused an unprecedented public spotlight on an isolated community of about 1,000 residents, who have been investigated numerous times during the past two decades but have so far avoided prosecution.

In Bountiful, residents hope the long legal process will mean they will one day be left alone.

"Naturally, we hope that our charter rights will be protected," Winston Blackmore, who leads one of two divided factions within Bountiful, wrote in an email to The Canadian Press.

"It would be nice to not have discrimination and persecution from the government. It would certainly be nice to have the same charter protection as everyone else."

Blackmore was charged in 2009 with one count of practising polygamy, as was James Oler, who leads the other faction inside Bountiful.

A judge later threw out the charges after concluding the way the province chose its prosecutors violated the men's rights, prompting the government to launch the current constitutional reference case.

Bountiful residents follow the Fundamentalist Church of Jesus Christ of Latter-Day Saints, or FLDS, which holds polygamy as a tenet of the faith. The mainstream Mormon church renounced polygamy more than a century ago.

The case heard two months of testimony offering wildly diverging opinions about life in such polygamous communities and the effect of polygamy itself.

The federal and provincial governments, as well as several intervener groups who want the current law upheld, argued polygamy is always harmful.

They said allowing men to marry multiple women will inevitably lead to physical and sexual abuse, child brides, the subjugation of women, and the expulsion of young men who have no women left to marry.

Indeed, the court heard allegations of all of those harms happening in Bountiful. Most notably, the court heard evidence of cross-border marriages involving teen girls as young as 12-years-old.

Both Blackmore and Oler were accused of helping transport teen girls to the United States to be married, and of marrying teen girls themselves. Those allegations prompted the RCMP to launch a renewed criminal investigation, which is still ongoing.

"Obviously, we want to see the law upheld, but from a big picture perspective, if the law is upheld, the next step is prosecutions under the law," said lawyer Kieran Bridge, who represents the group Stop Polygamy in Canada.

"I think removing the uncertainly about the validity or invalidity of the law will go a long way towards removing any roadblocks to prosecutions. That was the biggest hurdle."

Lawyers for Bountiful residents and civil liberties advocates argued the law violates the charter's religious guarantees, and rejected the argument that polygamy is inherently bad.

The law is an outdated relic akin to Canada's long-abandoned ban on homosexuality, they argued, and any alleged crimes can be punished under other laws, such as those prohibiting sexual abuse and human trafficking.

"The harms which come from the wrongful conduct in places like Bountiful have to be punished in different ways," said George Macintosh, an independent lawyer appointed by the court to argue the law should be struck down.

"I think there's been so much focus on the particular polygamy crime that prosecutors and police were downing their tools and they weren't focusing on the wrongful conduct, which is properly taken care of in several other provisions in the Criminal Code."

Robert Wickett, a lawyer who represents the Bountiful faction that follows James Oler, said his clients are anxious for Wednesday's decision, but he acknowledges it could be years before the case is finally settled.

Until then, the community will continue to live under a cloud, he said.

"If it's found to be unconstitutional, they'll be able to carry on with their lifestyle without fear of criminal prosecution," Wickett said in an interview.

Wickett said outsiders watching the case should also remember that Bountiful residents aren't the only Canadians in polygamous relationships.

The court heard evidence of polygamous marriages elsewhere in the country, as well as so-called polyamorous relationships involving more than two people who may not necessarily claim to be married.

"The issue of polygamy is far broader than simply the people who live in fundamentalist Mormon communities. The way the Criminal Code section is drafted, depending on how the court interprets it, could have an impact on a lot more people in diverse personal relationships," he said.

"So it's not just about Bountiful."