TORONTO, JUNE 9 -- Provincial and federal leaders of Canada tonight announced they had reached a fragile agreement on constitutional amendments aimed at keeping Quebec in the 123-year-old confederation.

However, the accord will still have to be put before the cabinet and provincial legislature of Newfoundland for approval, the premier of that province said.

Overcoming an 11th-hour impasse that threatened to scuttle negotiations for national unity, the 10 provincial premiers and Prime Minister Brian Mulroney signed constitutional changes they initialed three years ago at Meech Lake, Quebec, in an effort to persuade the predominantly French-speaking province of Quebec to sign Canada's 1982 constitution.

Mulroney said tonight, "Today, in some important ways, the idea of Canada has been vindicated. . . . It is a fair and honorable agreement."

The prime minister added that once the agreement is ratified by the legislatures of three provinces -- Manitoba, New Brunswick and Newfoundland -- which had rescinded or withheld their approval of the 1987 Meech Lake accord, "Quebec will rejoin the constitutional family."

New Brunswick Premier Frank McKenna called the compromise "the best deal possible and said he would help push it through the provincial legislature. Manitoba Premier Gary Filmon heads a minority government, but provincial opposition leaders, who were present at the Ottawa talks, said they would recommend passage to the legislature.

The dramatic signing at a public session came after the talks started to unravel over a clause that would recognize Quebec as a "distinct society" as an inducement to get it to sign the country's constitution.

The Meech Lake accord would have expired unless signed by all 10 provincial premiers by June 23. In the face of a renewed separartist movement in Quebec in recent months, political leaders of the province said if the agreement were not signed, they would reconsider Quebec's political relationship with English-speaking Canada along the lines of the "sovereignty association" referendum that was defeated in 1980.

One of the most recalcitrant holdouts who had threatened to reject the agreement because of his opposition to the special status for Quebec, Clyde Wells of Newfoundland, said in an emotional speech that his support, in the end, was based on a desire to keep Canada from breaking up.

"My new position is based on a sincere concern for the future of the country as a whole. . . . Having recognized that Quebec is a distinct society, I say to my friends of Quebec to place Canada first and Quebec second," Wells said.

He added, "I don't want to take the responsibility for doing irreparable harm to this country."

However, Wells said that all his signature means is that he will take his decision back to his cabinet and legislature Sunday and ask them to reaffirm his approval. He stressed that he still had "grave doubts" about the accord, but reitered that "the future of Canada may be at stake."

The premier of Quebec, Robert Bourassa, said the agreement was "a great gain for Quebec and a great gain for Canada."

Bourassa, who had refused to continue to participate in the talks if they continued to touch on diluting the distinct society clause, added, "We are totally assured that Quebec will be more fully protected."

The seven days of debate behind closed doors called attention to the deep cultural divisions between French- and English-speaking Canada and the powerful centrifugal forces of regionalism that have troubled the confederation of 26 million people since its founding in 1967.

During the debate, a number of provincial leaders said that even if these divisions are patched over by compromise, they would leave scars of alienation and intolerance that could take years to heal.

Members of the delegations' support staff said that this morning's session was marred by recriminations and accusations of bad faith, and that at several points some premiers nearly walked out.

Premiers from some English-speaking provinces have been under intense pressure not to give Quebec any constitutional powers not available to all provinces, while militant separatists in Quebec insist that the talks not dilute gains won in the April 1987 Meech Lake accord.

The compromise package contains three main parts:A letter of clarification from leading constitutional lawyers declaring that the "distinct society" clause complements -- but does not override -- Canada's bill of rights, or adversely affect minorities other than French Canadians. The letter, to be attached to the record of the constitutional conference but not signed by the premiers, appeared to have little legal weight and was seen as a face-saving device for critics of the "distinct society" provision.The creation of a special parliamentary commission that will start cross-country hearings in July into a new "Canada clause" for the constitution's preamble that would broaden the definition of the Canadian identity and explicitly recognize the multi-cultural character of the country and the equality of provinces.

The committee is to report by Nov. 1, at which time another constitutional conference will be called to consider the addition of sexual equality, multi-culturalism and rights of aboriginal peoples to the constitutional description of the "fundamental characteristics" of Canada.Provision of a five-year deadline for the provincial premiers to reform the appointed Senate chamber of Parliament into an elected and effective body with more equal representation among the provinces.

Had the premiers failed to reach agreement, the Senate would have been reapportioned to add two new seats each for the four sparsely populated western provinces and Newfoundland. Under the agreement Ontario will give up six of its present 24 seats in the 104-seat Senate, while New Brunswick and Nova Scotia will lose two each. Quebec will keep its 24 seats but gain in proportion to rival Ontario.

As the premiers ended their meeting shortly after 1 a.m. today, most of them appeared to be optimistic that the agreement in principle would be approved. Some of them said all that was needed was some "legal translation" by attorneys, and Mulroney hailed the apparent breakthrough as a "most important day for Canada."

But a snag developed when Newfoundland Premier Wells complained that the final draft had omitted an "important clause" that had been in an earlier draft. The clause was understood to have qualified the "distinct society" provision so as to preclude an interpretation that Quebec would be gaining any powers not available to the other provinces.

When the delegations returned to the conference center later this morning, Mulroney characterized the omission as a clerical oversight.

However, Wells and Manitoba's Filmon appeared to have other misgivings by lunchtime, telling reporters that the deal was unacceptable to them.