Just over 12 hours after CP Rail freight train operators walked off the job, the company has finalized a deal with the union that oversees the group of over 3,000 workers, sending them back to work.

The Teamsters Canada Rail Conference said their workers walked off the job at 10:00 p.m. EST on Tuesday, but the union says that a tentative deal has already been reached.

The union says that a deal was also reached for the Kootenay Valley Railway too.

When the strike was called, many freight customers said that it would have serious impact on Canada’s economy because it came at a particularly bad time for grain farmers.

They urged the federal government to take immediate action on the situation, but Justin Trudeau said he would not be as hasty as the previous government to order them back to work.

"Quite frankly, we have companies that have gotten used to the fact that in certain industries, the government in the past was very quick to legislate against unions," Trudeau said during a conference in Toronto. "We are not going to do that."

Canada’s Transport Minister Marc Garneau also said that he was confident that both sides would reach a deal without the need for government to step in.

Union representatives said, after the tentative deal was reached, that they were glad the government let them bargain with CP Rail instead of legislating them back to work.

“We would like to thank our members for their incredible support throughout this process,” said Doug Finnson, President of the TCRC, in a release. “We believe this is a fair contract that our members can feel good about ratifying. I am personally very satisfied with what we have negotiated.”

“Previous governments were all too eager to threaten back to work legislation, acting quickly on behalf of employers against workers and their unions,” said Finnson. “We thank the government for proving that collective bargaining can work when it’s allowed to.”

The train operators voted 94 percent in favour of strike action to back their contract demands in early April and voted 98 percent to reject CP's final offer last Friday.

CP Rail signed a deal with its signaling workers late on Tuesday night as well, making sure that commuter services in Toronto, Montreal and Vancouver would not be affected by the job action.

Details of the agreement haven’t been released and members are expected to vote on the deal in the next few months.

CP Rail says full service will resume at 6:00 a.m. local time across the country.

(With files from the Canadian Press)