TORONTO — Canadian National railroad is ending its lockout immediately and moving forward with a plan to get its trains moving again following a government order Thursday to enter forced arbitration with its labor union, according to a rail official. The Canadian government ordered CN and CPKC railroads into arbitration Thursday to end the lockout that began overnight. The rail official spoke to The Associated Press on condition of anonymity because of a lack of authorization to share the news ahead of the announcement. It’s still not immediately clear how quickly the trains will resume operating, but ending the lockout is the first step. CPKC hasn’t yet said when it will end its lockout. The government’s decision helped to avert potentially dire economic consequences for businesses and consumers across the country and in the U.S. Labour Minister Steven MacKinnon announced the decision to order the arbitration at a news conference Thursday moments after The Associated Press broke the news, citing an official familiar with the situation who was not allowed to speak publicly before the official statement. The dispute involves the country’s two major freight railroads — Canadian National and CPKC — and Teamsters Canada Rail Conference, the union representing nearly 10,000 engineers, conductors and dispatchers. Both CN and CPKC have said that the trains would be able to move again once the dispute enters arbitration, but it wasn’t immediately clear how quickly that would happen. MacKinnon said he expects it will be within days. The railroads locked out their employees after a 12:01 a.m. EDT deadline to resolve the dispute with the union passed without agreements. Talks resumed later in the day as workers picketed outside and business groups urged the government to force arbitration. MacKinnon said the government wanted to give negotiations every chance to succeed, but ultimately the economic risk was too great to allow the lockouts to continue. He had declined to order arbitration a week ago. “Canada’s economy cannot wait for an agreement that has been delayed for a very long time and when there is a fundamental disagreement between the parties,” he said. All of Canada’s freight handled by rail — worth more than $730 million a day and adding up to more than 375 million tons of freight last year — stopped Thursday along with rail shipments crossing the U.S. border. About 30,000 commuters in Canada were also affected because their trains use CPKC’s lines. CPKC and CN trains continued operating in the U.S. and Mexico during the lockout. Many companies in both countries and across all industries rely on railroads to deliver their raw materials and finished products, so they were concerned about a crisis without regular rail service. Billions of dollars’ worth of goods move between Canada and the U.S. via rail each month, according to the U.S. Department of Transportation. Paul Boucher, president of the Teamsters Canada Rail Conference, said Thursday morning that he believed the railroads were “holding the Canadian economy hostage to try and pressure the Liberal government to impose final binding arbitration and take your rights away to free collective bargaining.” Canadian Prime Minister Justin Trudeau decided not to force the parties into binding arbitration before the deadline passed for fear of offending unions and the leftist NDP party that his government relies on for support to remain in power. In anticipation of the work stoppage, the White House convened a multiagency Supply Chain Disruptions Task Force to assess the potential impact on U.S. consumers, businesses and workers, according to a Biden administration official. The official was not authorized to comment publicly and spoke on the condition of anonymity. Most businesses probably have enough supplies on hand and room to store finished products to withstand a brief disruption. But ports and other railroads would have quickly become clogged with stranded shipments that Canadian National and CPKC wouldn’t pick up.