For more than six months, the Maine Department of Transportation’s director of freight knew that a large portion of train track that runs through Maine was going to change hands.

Last week, the news broke that one of the largest rail operators in North America would buy the 481 miles of track in Maine and Quebec run by Bangor-based Central Maine and Quebec Railway. The sale to Calgary, Alberta-based Canadian Pacific Railway is expected to close by the end of the year.

The sale will mark the return of a Class 1 railroad to Maine for the first time since the 1980s, said Nate Moulton, director of freight at the Maine Department of Transportation. Now, a railroad that runs from Jackman in the west to Searsport in the east and Millinocket in the north will be part of a coast-to-coast rail network run by a company focused on running railroads, rather than an investment firm.

That could bring improved infrastructure and better connectivity to Maine, Moulton said.

Canadian Pacific “is not a private equity firm that’s just buying this as some sort of infrastructure investment,” Moulton said. “You hope for better equipment, better condition of the lines, more opportunity to connect with the national system. These are the kinds of things you get with a Class 1.”

Railroads are broken into classes based on the size of their operations. Class 1 railroads are the largest in North America, with operations worth more than $250 million. Central Maine and Quebec is currently a Class 3, or a short-line, railroad, according to Moulton. This means it has operating revenue of less than $20 million each year.

The last time Maine had a Class 1 railroad was in the 1980s, when Canadian Pacific owned a section of track in the state.

Central Maine and Quebec’s parent company, New York-based Fortress Transportation and Infrastructure Investors LLC, has been telling its investors of its plans to sell the Maine and Quebec railroad for several months, Moulton said.

It bought the railroad out of bankruptcy from Montreal, Maine and Atlantic Railway in early 2014, months after a train carrying crude oil went off the tracks in Lac Megantic, Quebec, exploded into a ball of fire and killed 47 people.

One of the most important advantages of having a large railroad operation such as Canadian Pacific in Maine will be the connectivity, according to Moulton. Any cargo loaded in Maine on a Central Maine and Quebec Railway train would have to be unloaded where the line ended and transferred to another railroad.

“Now, it can go anywhere in the system without ever having to be interchanged with another railroad,” he said.

Canadian Pacific’s operation stretches across the entire length of Canada and from Kansas City to Maine in the U.S. with the addition of Central Maine and Quebec to its network.

Another advantage the sale brings to Maine is Canadian Pacific’s focus on railroad development, Moulton said.

“This is a company that’s solely focused on operating railroads,” he said. “They have a lot of resources.”

Central Maine and Quebec Railway didn’t respond to a request for comment. A spokesman for Canadian Pacific said it planned to continue running the Maine and Quebec railroad as a “distinct and separate entity.”

“That being said, CP will be the new owner, and in this position, will instill its values of safety and efficiency on CMQ, similar to how CP manages its other subsidiaries comprising CP’s rail network,” said the spokesman, Jeremy Berry.

When Fortress became the owner of the track, Moulton said, it made major safety improvements to the railroad. He said he hopes the new owner will continue to make upgrades, including more tracks and more frequent trains.

“What that leads to is more development in Maine, more businesses,” he said.

This story appears through a media sharing agreement with Bangor Daily News.