OTTAWA -- Canada has reached a framework agreement with the European Union on establishing a comprehensive free trade zone encompassing virtually every sector of economic activity, with an official ceremony expected Friday.

After a day of leaks that a deal in principle had been reached, the prime minister's office all but confirmed the occasion Wednesday evening by announcing Stephen Harper would travel to Brussels on Thursday to meet European Commission president Jose Manuel Barroso "with the goal of concluding the CETA negotiations."

Earlier in the day, both Harper and Barroso tweeted that they expected an agreement "soon."

The promise was repeated in the throne speech, which was delivered by the Governor General in the afternoon.

Although observers have been predicting a conclusion to the four-year-talks at various stages during the past year, an agreement always seemed to elude negotiators, particularly on the difficult agriculture issues.

Sources say the final breakthrough came in the past few days after Canada agreed to double its quota on EU cheese exports in return for greater access for Canadian beef and pork.

The news of the compromise angered the association representing dairy farmers, which quickly issued a news release denouncing the "giveaway." The organization estimated the quota hike would give the EU exclusive access to 32 per cent of Canada's "fine cheese" market.

NDP Leader Thomas Mulcair and Liberal Leader Justin Trudeau said they would reserve judgment until they see the text, but Mulcair added he was concerned the government was "throwing Canadian dairy farmers under the bus."

But some other agricultural groups were hyping what negotiators were able to secure in terms of access to one of the world's largest and richest consumer markets.

Kathleen Sullivan, executive director of the Canadian Agri-food Trade Alliance, predicted agriculture package would boost exports of Canadian beef and pork by $1 billion annually, with another $300 million in shipments of other food products, such as grains, processed food and maple syrup.

Canadian beef and pork producers will need to ramp up production of hormone-free livestock in order to meet EU safety standards, but Sullivan said the potential was there to make Europe one of the leading markets for Canadian beef, and among the top five markets for pork.

"It is an impressive deal, the government has done well," she said.

Other sources have told The Canadian Press that Ottawa has had to also concede to extend patent protection for brand-name drugs, which will be a bitter pill for provinces to swallow.

Details are sketchy, but it is believed the changes would extend the time generic manufacturers must wait before they can issue cheaper copies by up to two years, which could increase the cost to provincial drug plans and consumers by more than $1 billion a year.

As well, brand name manufacturers appear to have won the right to appeal unfavourable rulings on their patents, which could also delay introduction of less expensive generic drugs.

The agreement also calls for a phase-out of tariffs on auto imports, and allows European firms to bid on some sub-national government procurement -- affecting provincial and municipal contracts.

After four years of negotiations, business lobby groups welcomed with relief that an end-line appeared in sight.

"On both sides of the Atlantic, the CETA will create jobs, spur investment and promote economic growth," said John Manley, a former Liberal cabinet minister who currently heads the Canadian Council of Chief Executives.

"The agreement is important because it opens markets for small businesses looking to export goods and services, invest, and commercialize new technologies in Europe and other markets around the world," said Jayson Myers of the Canadian Manufacturers and Exporters.

Trade lawyer Lawrence Herman of Cassels Brock said the agreement would be "milestone-setting," pointing out that its reach will make NAFTA -- the Canada-U.S.-Mexico trade agreement of 20 years ago -- look modest by comparison.

"It will cover a wide swath. Lots of internal matters, well beyond the border, like government procurement, patent protection, investment disputes and the like," he said. "The sheer breadth of this deal may come as a surprise to many, since the government hasn't prepared Canadians well enough."

For the Harper government, a completed CETA that is generally supported by Canadians would be a major achievement and no doubt something the prime minister can trumpet in the next election campaign. The government has long made trade expansion around the world a key element of its agenda for jobs and prosperity, but as yet had little to show for all its grand ambitions.

But analysts noted that something could still go off the rails and that the ratification process, requiring approval of the provinces in their areas of jurisdiction and the 28 member European states, will likely take another two years.

That gives critics plenty of time to try and scuttle the deal. The Council of Canadians jumped the gun on the next step Wednesday issuing a letter to the premiers asking that they hold off assent and seek broad public input on the agreement.