BRUSSELS — A stalled deal to deepen commercial ties between the European Union and Canada appears back on track, after Belgium overcame objections that had threatened to derail the region’s entire trade agenda.

The deal, the Comprehensive Economic and Trade Agreement, was held hostage by the French-speaking portion of Belgium, Wallonia, where the rust belt has been hit hard and farmers worry about potential competition. The Belgian prime minister, Charles Michel, said on Thursday that the country’s leaders had reached a compromise that would restrict biotech crops and address a disputed legal provision.

Although the breakthrough paves the way for a deal, it could still run into problems.

The Belgium regional parliaments have to vote on the compromise, which the prime minister said was expected by Friday at midnight. The other 27 countries in the European Union must agree. And Canada needs to sign it.

“This is a positive development, but there is still work to do,” Alex Lawrence, the press secretary for Chrystia Freeland, Canada’s international trade minister, wrote in an email. “Canada remains ready to sign this important agreement when Europe is ready.”