In a landmark opinion, Canada's Supreme Court said Thursday the government can redefine marriage to include same-sex couples.

However, the court added that religious officials cannot be forced to perform unions against their beliefs, and the legislation to allow gay marriage (search) must still pass with a majority of the House of Commons.

Canada would join Belgium and the Netherlands in allowing gay marriage if the government rules that it is legal nationwide.

The court's decision brings to the final stages a long, bitter fight over whether gays and lesbians should be allowed to marry in Canada. Public opinion is evenly divided on the matter, and advocates for both sides are preparing for the final phase of the battle.

Judges in six provinces and one territory have already overturned the traditional definition, allowing thousands of same-sex weddings.

"This is a victory for Canadian values," said Alexander Munster of Canadians for Equal Marriage (search).

To pass in the House of Commons, the legislation needs the approval of about 44 of the 95 Liberal backbench members of Parliament to obtain a 155-vote majority in the 308-seat House.

One top Liberal predicted the legislation should pass easily after its introduction, likely early next year. It already has the support of the 38-member Liberal cabinet and virtually all the 54 Bloc Quebecois (search) and 19 New Democrat (search) MPs.

However, some Liberal members of Parliament are opposed.

"I do personally have a problem with redefining marriage and I'm sure some of my colleagues do as well," said Roy Cullen of the Liberal Party.

Gordon Young, pastor of the First Assembly of God Church in St. John's, Newfoundland, was highly disappointed by the ruling.

"It's a sad day for our country," Young told CBC television news. "God is in the DNA of this nation. We believe that changing the definition of marriage is changing the divine institution that God put in place for the order of our society."

The ruling by the court in Ottawa, the federal capital, said the legal definition of marriage should change with public opinion over time.

"Several centuries ago, it would have been understood that marriage be available only to opposite-sex couples," the court said in its advisory opinion. "The recognition of same-sex marriage in several Canadian jurisdictions as well as two European countries belies the assertion that the same is true today."

The opinion is not legally binding and it's now up to the federal government to make gay marriage protected by law nationwide.

The high court opinion comes 18 months after former Prime Minister Jean Chretien abandoned his government's fight against same-sex marriage by refusing to appeal provincial court rulings in Ontario, British Columbia and Quebec, which declared traditional marriage laws were unconstitutional.

His government then drafted legislation that would allow gay and lesbian weddings in city halls, courthouses and in religious institutions that choose to perform them. To ensure the bill would be passed, the Liberal government asked the Supreme Court three questions:

— Does the federal government have exclusive authority to define marriage?

— Does the charter protect religious groups from having to perform gay weddings against their beliefs?

— Is the proposed same-sex marriage law constitutional?

Prime Minister Paul Martin expanded the reference after he was sworn in a year ago, adding a fourth question: Is the traditional definition of marriage — between one man and one woman — also constitutional? This was aimed at clarifying once and for all whether the century-old definition of marriage is flawed.

The federal Conservatives and several Liberal MPs are expected to fight to preserve marriage for heterosexuals.