TORONTO (AP) _ The Canadian Supreme Court upheld as constitutional Ontario's law requiring most stores to close on Sundays, but the provincial government was expected to come under pressure from the public and some retailers to amend the law.

The court last year struck down a similar law in Alberta province as a violation of religious freedom for non-Christians. In its 6-1 ruling Thursday, the court said the Ontario law infringed on religious freedom but did not violate the constitution.

The court accepted the Ontario government's argument that its 1976 Retail Business Holidays Act is secular, not religious, and is intended to give the entire community a day of rest.

The Canadian Jewish Congress, representing the nation's 350,000 Jews, criticized what it said was the court's contradictory position on religious freedom.

''Sunday closing presents a unique difficulty to a significant segment of our community who observe or wish to observe Sabbath restrictions on Saturday,'' it said.

The court's ruling applied specificially to the blue law in Ontario, Canada's wealthiest and most populous province. But it was viewed as setting a precedent for the constitutionality of similar laws in other provinces, including Quebec, New Brunswick and Manitoba.

Since the Supreme Court ruling last year, British Columbia and Alberta have permitted municipalities to decide on their own whether to allow Sunday shopping.

Large grocery chains in Ontario and some other stores have been defying the Sunday closing law in anticipation of its demise. Some retailers said after the ruling that they would abide by it, while others said they would continue opening Sundays and risk prosecution.

Labor groups welcomed the ruling, as did Jim Bennett, vice-president of the 76,000-member Canadian Federation of Independent Business, which represents small retailers.

Bennett said before the ruling that shopowners who already work six days would be forced to work a seventh for fear of losing business to large chains.

Merchants who oppose the law have complained that an exemption granted to convenience and tourist stores violates equality rights under Canada's 1982 Charter of Rights and Freedoms - an issue the court did not resolve.

Barry Agnew, vice-president of the Hudson's Bay department store chain, said his company will lobby the Ontario government to eliminate the exemptions, which he called unfair. He said political and commercial pressure inevitably will force stores to open seven days a week.

Ontario Attorney General Ian Scott said the government would refer the act to an all-party legislative committee for hearings on possible amendments. One possibility was to follow Alberta's lead in allowing municipalities to decide for themselves whether local stores can open.

A Gallup Poll published Dec. 8 said 53 percent of Canadians favor Sunday shopping, compared with 49 percent three years ago.

Furrier Paul Magder, one of four merchants who challenged the law before the Supreme Court, said he would keep fighting to have it changed.

''I'm not a sportsman but I could attend a sports event on Sunday. I don't deprive other people of that right and I don't feel people should deprive me of the right to operate my business on a Sunday,'' he said.

Magder, who has been charged more than 200 times for defying the law, says he does 40 percent of his business on Sundays. His son, Glen, said they may keep the store open on Sundays despite the court ruling.