Canadian Pacific Railway and the Teamsters Canada Rail Conference say they have reached a four-year tentative agreement to end a strike hours after it began.
The parties also reached a five-year deal for the Kootenay Valley Railway.
The union says full operations at both railways will resume Thursday morning across Canada.
Union president Doug Finnson called the deal a fair contract that its members can feel good about.
CP Rail chief executive Keith Creel says the agreements are positive for 12,000 railway employees, customers and the entire Canadian economy.
WATCH: Alberta forestry industry monitoring labour unrest at CP Rail (April 24)
Creel adds that the agreement will provide long-term stability.
The tentative agreements must be ratified by Teamsters members over the coming months.
Details of the agreement are being withheld pending ratification.