BANGOR, Maine — Officials say the company formed a year and a half ago to acquire the bankrupt Montreal, Maine and Atlantic Railway has made significant headway in its efforts to upgrade crumbling infrastructure and build up its customer base.

Central Maine and Quebec Railway has invested heavily in needed equipment and improvements to portions of the 481 miles of track it owns in Maine, Vermont and Quebec, according to its leader.

“We’ve put $23 million of fresh capital into this railroad,” Chief Executive Officer John Giles said during a recent visit to Bangor to celebrate the opening of the company’s new offices at 700 Main St.

“That’s just capital. We’ve spent additional monies on locomotives, getting a fleet of locomotives in here making it more reliable. Virtually all of the locomotives that were here when we arrived are gone,” said Giles, a more than 45-year veteran of the rail industry who came out of retirement to head up the effort to save hundreds of miles of tracks from St. Jean, Quebec, near Montreal, to Searsport.

In early 2014, New York-based Fortress Investment Group, currently worth about $75 billion, purchased Montreal, Maine and Atlantic Railyway’s assets at auction. The former railway went bankrupt after one of its trains derailed and exploded in Lac-Megantic, Quebec, the year before, killing 47 people. Giles represented Fortress during the auction proceedings and ultimately took on the role of president of the company that would replace Montreal, Maine and Atlantic Railway.

Winning back the people affected by the Lac-Megantic tragedy has put the new company on the fast track to recovery, according to Giles.

“The railroad was severed in the middle so after the tragedy, basically we were running two railroads,” Giles said. “There was a chasm of a mile and a half in the middle. You couldn’t move traffic through the city.

“We patched it up, and then we negotiated what we call a social compact with the city of [Lac-] Megantic, and that was something we thought was necessary because those people had been through so much,” Giles said.

“And in it, we promised not to move any hazardous goods through the city unless and until we had completed our first year of capital [improvements], and we had satisfied ourselves that the track was safe and people were trained and that we could do so without having our hearts in our mouth,” he said.

“Now we move hazardous goods through [Lac-] Megantic and we have a very good relationship,” Giles said.

An exception of the restored ties with Lac-Megantic, however, is crude oil.

Chief Administrative Officer Gaynor Ryan said Central Maine and Quebec has opted not to ship crude oil through Lac-Megantic in 2016 out of respect for the community.

Conrad Lebrun, director of buildings and projects for Lac-Megantic, said that the moratorium on shipping crude oil through the community came at the city’s request.

“Back before they started operations again, we cited a social compact with them to have freedom to go back on rails again and to have a moratorium on crude oil until the end of 2016,” Lebrun said.

Lebrun agreed that Central Maine and Quebec and the city have developed a good working relationship.

“It is good,” he said. “We have access to CMQ representatives. When we need to, we call them and they call us right back and we work issues out well. We expect it to keep going in the future.”

More system upgrades are in the works, thanks to a $20 million matching federal grant awarded last fall to the Maine Regional Railways Project, a $37 million public-private partnership also involving the state and Pan Am Railways and New Brunswick Southern Railway, Giles said.

The regional plan aims to upgrade tracks in northern and eastern Maine to a 25 mph rating and eliminate numerous bottlenecks caused by speed limits that have bedeviled traffic in the region.

Much of the Montreal, Maine and Atlantic track system was limited to 10 mph before the ownership changed, Giles noted, adding that the former owner “had put no capital into this railroad for decades.”

In another step forward, Central Maine and Quebec won a bid to operate the state-owned Rockland Branch, a 60-mile track between Rockland and Brunswick, as of Jan. 1. The addition of the Rockland Branch brought the total miles of track it operates to 538, Ryan said.

“There’s a small customer base there, and we’re working hard to develop that base and look for new opportunities,” Ryan added.

Ryan said that the tourist excursions offered by the former operator currently are not part of the plan.

“We’re not operating the tourist train going forward, but if there’s another entity out there that’s interested in operating the tourist train, we’re willing to work with them and help that happen,” she said, adding, “I think with the right marketing and the right equipment, you could do a really nice job with it. It’s a beautiful area down there, so definitely it’s an opportunity.”

As it works to upgrade infrastructure, Maine Central and Quebec also is putting its business house in order.

“Now we’re just focusing on continuing to build the business and increase our car loads,” Ryan said.

Giles said that since Maine Central and Quebec bought the railroad, its base of active customers has increased almost three-fold.

“When we arrived, there were a little over 3,000 carloads per quarter. We’re now in the 7,000 range today,” he said.

Arguably one of the biggest shifts under new ownership is a company-wide emphasis on safety that has involved, besides track and equipment upgrades, safety instruction for all employees when it assumed control, training programs for communities and paying to send town fire chiefs to training centers in the western U.S.

“What we try to do is put the capital where it’s needed, do the maintenance that’s required, rigorous inspections and again we’ve got pros leading these things,” he said.

A particular source of pride for Giles, given his predecessor’s Lac-Megantic legacy, is the safety award that Central Maine and Quebec received last year from the Railway Association of Canada.

“We’re really delighted with that. We’re fresh out of the box,” Giles said. “We come from a legacy of not quite getting it and then to be singled out for safety, you know, that’s great.”