CN Rail and the Teamsters union say a new tentative agreement has been reached, averting a potential strike by 3,000 workers that could have come as early as this weekend.
CN says details of the tentative three-year contract won't be released until it's ratified by union members.
The union, which represents about 3,000 conductors and yard workers, had previously rejected another tentative deal negotiated last fall.
The federal government had said it was prepared to intervene and force CN workers back on the job if they had gone ahead with a walkout that could have begun as early as Saturday morning.
Teamsters Canada Rail Conference had been trying to come to a new agreement with the railway after its members turned down a tentative deal reached in the fall.
But late Wednesday, Labour Minister Kellie Leitch said the federal government would move to block any strike by introducing back-to-work legislation.
Any strike would have been crippling for farmers hoping to ship a backlog of grain from this year's harvest, as well as in manufacturing and forestry, the minister said. "This government will not allow additional obstacles preventing Canadian exports from getting to market."
A rail strike "would have a very serious impact, as strikes at either CN or CP always do, on the whole Canadian economy," said Bob Ballantyne, president of the Freight Management Association of Canada, whose members include retailers, food manufacturers, coal companies and other large companies that rely on railways.
In May, 2012, Canadian Pacific Railway Ltd. workers halted rail traffic in a strike that lasted a few days before then-labour minister Lisa Raitt legislated them back. She warned that the economy could not withstand the impact, which was estimated at as much as $540-million a week.
While some manufacturers can switch to CP or use trucks in the case of a strike, many cannot, making production stoppages likely as incoming raw materials halt and the outbound goods pile up, Mr. Ballantyne said.
"If it's some kind of a continuous manufacturing process and they're going to run out of the raw material that goes into this process, the issue of shutting it down is a very expensive issue. If you are running a steel smelting operation or chemical production facility, the business of shutting down and then restarting is a huge issue," Mr. Ballantyne said.