Canadian Pacific Railway has reached a tentative deal with the union representing striking engineers, meaning operations will be back to normal as early as Thursday.

The rail company said in a release on Wednesday that it had struck a four-year tentative agreement with conductors and locomotive engineers at CP, and a five-year agreement with conductors and locomotive engineers at the Kootenay Valley Railway, both of which have been on strike since Tuesday.

"Details of the agreement will be presented to the TCRC membership for ratification," CP said, referring to the Teamsters Canada Rail Conference, which represents the more than 3,000 striking workers — about a quarter of the company's workforce.

Though tentative, the deal means the strike is over — for now at least. Ratification votes "will take place over the coming months," Teamsters said, once members can be informed on the contents of the offer, but the picket lines will come down immediately.

The union says operations should be back to normal by 6 a.m. local time, in every time zone across the country.

Details of the agreement are being withheld pending ratification.

3rd strike in 6 years

The strike, while brief, was the third labour stoppage between Canadian Pacific and its workers in less than six years.

"CP has a pretty adversarial culture of labour relations with their union," Brock University labour professor Larry Savage said in an interview, "and a lot of the underlying issues that caused the first two strikes haven't been addressed."

Past disputes have hinged on financial issues. This time around, said locomotive engineer Ron Thiede of Winnipeg, safety and fatigue issues surrounding scheduling were paramount for him.

"Money is not the issue," Thiede told CBC News in an interview. "We're not looking for any huge gains per se, we're looking for quality of life, respect in the workplace, that's what we're looking for here. We're looking to maintain our rest … because it speaks to being ready for work."

"We manage thousands of tonnes of materials that are very volatile, so we got to be in a position to be ready to work at all hours," Thiede said.

Passengers largely unaffected

Passenger trains were largely unaffected during the strike, but shipping of agricultural commodities was disrupted. Because of the potential economic harm, there was some question as to whether the federal government would have stepped in if the strike had continued, but Prime Minister Justin Trudeau said in an interview with Bloomberg on Tuesday that "we believe in working things out at the bargaining table … and we'll use all sorts of levers to enforce that."

Labour Minister Patty Hajdu's office also said that the Liberal government believes in "the collective bargaining process."

Savage said it's good that the two sides were able to avoid an imposed end to their dispute. "I think it's in the best interest of the employer and the union to come to a negotiated settlement, because when you come to a negotiated settlement, both parties are not always satisfied by the outcome, but they can live with the outcome knowing that an outsider didn't impose it on them," he said.

Shares in CP rose almost three per cent to a record of $247.65 per share after the agreement was announced.