HERMON, Maine — Thanks to a recent $3 million loan, workers are being rehired by the bankrupt railway that owned the runaway train that devastated a Canadian town, killing 47 people, the railway’s court-appointed trustee said Monday.

Montreal, Maine and Atlantic Railway secured a $3 million loan from Camden National Bank to allow it to keep operations through the bankruptcy and sale process into 2014 and staff its trains with two-man crews, said attorney Robert Keach, whom a U.S. District Court judge appointed to oversee MMA operations during the Canadian and U.S. court proceedings.

The loan, which closed Friday, allows the railway to operate in Canada until Feb. 1, bolsters its potential sale price, and helps the railway’s 18 potential buyers get a better look at what one of them might get, Keach said in a statement.

“This financing will allow us to operate comfortably through a reasonable and thorough sale process,” Keach said Monday.

About 30 workers who were laid off when the railway declared bankruptcy have been or will be rehired. Half of them work on the American side of the border, Keach said. Stephen Matteo, senior vice president of commercial banking at Camden National, said he was pleased the bank could help MMA.

“Getting people back to work gives our bank a strong sense of community pride,” Matteo said in a statement. “Keeping the railway running safely is good for the people and economies of Maine, the Northeast and Eastern Canada.”

The unmanned train had several oil tankers and was parked for the night on a mail railway line outside Lac-Megantic, Quebec, when its brakes apparently gave and its tankers exploded when it derailed, destroying the center of the town.

The train’s sole operator, an engineer, had finished his shift in accordance with company procedures and gone to a nearby hotel. Company officials have suggested that the engineer failed to set enough brakes to guarantee safety. The cause of the accident remains under investigation. The disaster, one of the worst in Canadian and U.S. history, spurred safety reviews in both countries.

An increased bankruptcy sale price will likely generate more money for victims suing the railway for its role in the accident, Keach said.

Twelve of the 18 potential buyers have signed nondisclosure agreements, indicating a high level of interest in buying the railway, which owns more than 510 route miles of track serving Maine, Vermont, Quebec and New Brunswick. Before accident, MMA operated 15 trains daily with main line operations between Millinocket and Searsport, Maine, and between Brownville Junction, Maine and Montreal, Quebec.