Teamsters Canada says it has reached a tentative deal with CN Rail to end a week-long strike, establishing an agreement-in-principle to renew the collective agreement for more than 3,000 railway workers.

CN's normal operations will resume tomorrow at 6 a.m. local time across Canada, a statement from Teamsters Canada said.

"I am pleased to announce that we've reached a tentative agreement with CN. I would like to thank our members for their incredible courage and solidarity," said François Laporte, president of Teamsters Canada, in the written statement.

"I would also like to thank all the Teamster local unions from across different industries, all the labour organizations and members of the public who supported us on the picket line."

A statement from CN Rail said staff will return to work at 2 p.m. Tuesday.

Transportation Minister Marc Garneau said an agreement between CN Rail and Teamsters Canada would not have been reached had the government legislated CN Rail back to work. He spoke to reporters in Ottawa on Tuesday. 0:41

"We want to thank our customers for their patience and support and assure them that CN is preparing to resume full rail operations as soon as possible," JJ Ruest, president and chief executive officer of CN, said in a written statement. "I would also like to personally thank our employees who kept the railroad moving safely at a reduced capacity."

Transport Minister Marc Garneau said the deal was reached because his government trusted the parties when they said they understood the hardship the strike was causing and were serious about negotiating an agreement.

"Had we taken an approach like the previous government, of deciding to legislate back to work, we would not have a solution today," Garneau said. "Because as quickly as we would have decided to convene Parliament, with everything that needs to be done to arrive at royal assent for a piece of legislation, we still would not have an agreement today."

Labour Minister Filomena Tassi thanked both sides and the federal government's mediators for staying focused and reaching a deal.

With a tentative agreement to end the CN strike on the table, one employee offers his take on key issues. 1:52

"Both parties expressed to us, as we went through this process, a sincere commitment to wanting to reach an agreement ... together with a commitment to be flexible," she said.

While workers will return to their posts tomorrow morning, Garneau said CN will have to change its winter shipping plans to eliminate the backlog created by the strike. He didn't say what those changes might entail.

NDP Leader Jagmeet Singh pointed out that the Liberal government introduced back-to-work legislation when Canada Post workers launched a series of rotating strikes last year.

"I'm very happy to see that there is a negotiation that was settled with free and fair negotiations," he said. "I'm also happy to see the government hasn't made the same mistake that it made last time, which was to intervene in a way that disturbed and negatively impacted the negotiations."

Details of deal not released

The railway workers had raised worries about long hours, fatigue and what they considered dangerous working conditions. CN rejected the union's claim that the strike concerned workplace health and safety, suggesting instead that it revolved around worker compensation.

The union's statement extended thanks to Prime Minister Justin Trudeau for respecting workers' right to strike and said Garneau and Tassi were "instrumental in helping parties find common ground."

Details of the agreement, which must be ratified by union members, were not immediately available.

The federal government had been under pressure from a number of affected industries and provincial governments to help end the strike.

Hundreds of Quebec farmers marched through Montreal streets Monday alongside a convoy of tractors to dump heaps of corn at the steps of Trudeau's riding office, calling on Ottawa to resolve the week-long labour stoppage.

In a written statement, the Alberta wheat and barley commissions expressed relief at the news of the deal, while cautioning that there needs to be a plan in place for keeping grain moving during future rail strikes.

"The threat of strikes affecting grain movement is a recurring theme every few years and we need a long-term solution to ensure Canada can meet its export commitments," said David Bishop, chairperson of Alberta Barley.

The Grain Growers of Canada released a statement applauding the deal and echoing Bishop's concerns.

"We've seen the impact of a week-long rail strike and it simply cannot happen again," the statement said.