BANGOR — The Maine Department of Transportation says it could seal the deal to preserve 233 miles of rail in a matter of weeks if all parties agree on a price.

Montreal, Maine & Atlantic Railway and the Maine DOT are in negotiations to settle the deal without formal abandonment proceedings for the rail in northern Maine. The company asked last winter to abandon the tracks, saying it was losing $4 million to $5 million a year on the line.

Economic development officials tell the Bangor Daily News that the tracks’ preservation would help maintain as many as 1,722 jobs that could be lost if the freight lines are abandoned.

The state plans to buy the tracks and lease them to a rail operator that would keep northern Maine’s freight moving.