Call it a win for the Walloons.

The Belgian government says it has broken a deadlock over a major trade agreement between the European Union and Canada, known as the Comprehensive Economic and Trade Agreement. The deal had been held up in the final days by Wallonia, a tiny French-speaking enclave in the small country of Belgium.

The roughly 3.5 million Walloons account for less than 1 percent of the entire population of the European Union, which has more than 500 million residents. While their numbers may be small, the Walloons' vote packs a wallop. They voted against the trade deal, which was seven years in the making, holding out for more favorable conditions.

The agreement was to be signed at an elaborate ceremony Thursday in Brussels. But it was postponed while Belgian and other European negotiators went back to the table to work on Wallonia's demands.

The Walloons were concerned that the trade pact could reduce health and environmental standards and give too much power to multinational companies. There were also concerns about Canadian pork and beef imports flooding into Wallonia's agricultural region.

Belgian Prime Minister Charles Michel announced Thursday that an agreement had been reached, which among other things provides guarantees for farmers.

The deal still needs the full backing of all 28 EU member states and Canada. But Michel said the agreement was on track to be approved by midnight Friday by all the countries involved.

The Walloon premier, Paul Magnette, says it was important to take the extra time to work out the wrinkles.

"I am sorry for all the other Europeans we made wait and for our Canadian partners," he said. "But if we took a bit of time, what we achieved here is important, not only for Wallonia but for all Europeans."

The delay illustrated the complexities of reaching a major trade agreement. Others are on the horizon, including the Trans-Pacific Partnership, which involves the Americas and Asia, and the Transatlantic Trade and Investment Partnership, which includes the U.S. and the EU.

A Canadian official said his country was ready to sign, but there were still a few loose ends.

"This is a positive development, but there is still work to do. There remain additional steps before signing," Alex Lawrence, a spokesman for Canada's international trade minister, Chrystia Freeland, wrote in an emailed statement to NPR.

"Canada has done its job," he wrote. "Canada remains ready to sign this important agreement when Europe is ready."

Canadian Prime Minister Justin Trudeau canceled his plans to travel to Brussels to sign the agreement on Thursday. EU President Donald Tusk said he would let Trudeau know when to rebook his flight "only once all procedures are finalized for EU signing CETA."

Copyright 2016 NPR. To see more, visit