OTTAWA — A strike by about 3,000 locomotive engineers and conductors at the Canadian Pacific Railway unexpectedly ended on Monday, its second day, as both sides agreed to arbitration. The announcement came about half an hour before a bill was to be introduced in Parliament ordering the members of the union, the Teamsters Canada Rail Conference, back to work.
Canadian Pacific said the “ramp-up process” to resume train service had begun. Though it could not say precisely how long that would take, a spokesman, Martin Cej, said “it will be fast.”
The agreement by the union and the company eliminated the possibility of disruptions, increased costs and even shutdowns for a variety of businesses throughout North America. Three commuter lines that carry about 19,000 people a day along Canadian Pacific tracks in Montreal were also closed by the walkout.
“While we would have preferred a negotiated settlement, this is the right thing to do at this time,” E. Hunter Harrison, the chief executive of Canadian Pacific, said in a statement.
It would have taken at least several days for a back-to-work bill to make its way through Parliament. When it appeared that the Conservative government was about to introduce the bill, both of the main opposition parties condemned the plan.
“The Conservatives always have the same answers: to attack the workers, attack their rights — their constitutional rights,” said Alexandre Boulerice, a member of Parliament for New Democratic Party, which was partly founded by labor unions.
In a news conference originally intended to announce the return-to-work legislation, Kellie Leitch, the labor minister, instead praised the two sides for agreeing to arbitration.
“I do believe there are still numerous issues on the table and I’m confident that the mediation and arbitration process will get them to the place where they need to be,” she said.
Earlier in the House of Commons, Ms. Leitch said that the strike would reduce Canadian economic output by 205 million Canadian dollars a week.
Resource companies, agricultural shippers and many manufacturers, particularly automakers, are not able to fully replace the transportation provided by Canadian Pacific by using trucks. The railroad also has a growing business shipping production from Canada’s oil sands to the United States.
The union did not respond to requests for comment.
Negotiations collapsed early Sunday morning over the length of shifts and rest breaks for train crews. Before the strike, the union said that the railway was demanding unspecified rule changes that would tire out crews and create a safety hazard.
The railroad company said that 72 percent of conductors and engineers were not using all of the break time they were entitled to under the previous contract.
“Our conductors and engineers have plenty of options for time off, but the vast majority don’t take full advantage of those opportunities,” Mr. Harrison said in a statement issued last weekend. “We want to implement a model that allows us to properly schedule crews while maintaining the highest standards of safe railroading.”