Belgian political leaders have reached a consensus in support of the Ceta trade deal between the EU and Canada, Prime Minister Charles Michel has said.
He said they had agreed on an addendum to the deal which addressed regional concerns over the rights of farmers and governments.
The changes will still have to be approved by the other 27 EU members.
A signing ceremony on Thursday was cancelled after the French-speaking region of Wallonia vetoed the deal.
Wallonia, a staunchly socialist region of 3.6 million people, had been leading objections, demanding stronger safeguards on labour, environmental and consumer standards. It also wanted more protection for Walloon farmers, who would face new competition from Canadian imports.
But after the latest round of marathon talks, Mr Michel tweeted: "All parliaments are now able to approve by tomorrow at midnight. Important step for EU and Canada."
He did not give further details, but the premier of the Flemish region, Geert Bourgeois, said the original text of the trade deal remained the same.
"This is a clarification. The actual treaty does not change," he said.
'Once bitten, twice shy'
Canada's Foreign Minister Stephane Dion said he was "cautiously optimistic" that the deal was back on track.
"Once bitten, twice shy, we hope that the Europeans have agreed between themselves because Canada is ready to sign," he said during a visit to Paris, adding that "if the news you announced becomes reality, it is excellent news".
A spokeswoman for Canada's Global Affairs ministry said the latest developments from Belgium were "positive", but there was "still work to do".
"There remain additional steps before signing. Canada has done its job. We negotiated a progressive agreement that will create jobs and growth for the middle class. Canada remains ready to sign this important agreement when Europe is ready," she said.
European Council President Donald Tusk tweeted, "Only once all procedures are finalised for EU signing CETA, will I contact PM @JustinTrudeau".
The head of the Walloon government, Paul Magnette, said the region's resistance had yielded big results.
"Wallonia is extremely happy that our demands were heard," he said.
"If we took a bit of time, what we achieved here is important, not only for Wallonia but for all Europeans," he added.
President of the Business Council of Canada John Manley told the BBC that his organisation was "pretty optimistic" that Ceta would go ahead.
But he said business and politicians had not done well at selling the trade deal to the public.
"Neither of those groups has done a very good job of reminding people of how important trade is to their personal lives and well-being," he said.
It took seven years to negotiate Ceta, the EU's most ambitious trade deal yet.
The Ceta wrangling has raised new concerns about future UK negotiations with the EU on a Brexit trade deal.