Negotiations to avert a major railroad strike in Canada will resume on Wednesday after talks between the three parties were stalled for months.

Leaders from Canadian National Railway Co., Canadian Pacific Kansas City Ltd. and the union representing their workers met with Labor Minister Steve MacKinnon on Monday in an effort to forestall a work stoppage that could lead to massive supply chain disruptions. 

“The meetings were frank, constructive discussions that reflected the gravity of the situation before Canada’s railways, workforce, and entire economy,” MacKinnon wrote in a statement. These parties transport close to C$400 billion in goods annually, he said, or about $290 billion. Federal mediators will also participate in the talks. 

Christopher Monette, a spokesperson for the union, Teamsters Canada Rail Conference, told Bloomberg that the goal was to increase “the pace and frequency of discussions.” 

“A work stoppage can be avoided, provided both companies are willing to return with fair and equitable proposals,” he wrote in an email. The union represents close to 10,000 workers at the two companies. 

Last week, Keith Creel, chief executive officer of Canadian Pacific Kansas City, said on an analyst call that a work stoppage was “most probable” and the two sides are still far apart. Both rail companies have said that they are no closer to a deal than when negotiations began in November last year. 

Canadian National Railway cut its earnings forecast in July as customers began rerouting shipments to avoid potential disruptions. Shares of both railways have trailed the 6% rise of the S&P/TSX Composite Index this year. 

No strike can occur until the government finishes assessing which shipments must continue during a work stoppage. The Canada Industrial Relations Board must determine how a service interruption might impact health and safety. That ruling is anticipated on Aug. 9, and a strike could begin three days after that.