The St. Lawrence and Atlantic Railroad Co. plans to stop service to Portland, forcing the line’s sole customer – the B&M Baked Beans factory – to turn to more expensive transportation operations to maintain operations.

Since the 1920s, B&M has relied on railcars to deliver millions of pounds of pea beans a year from the Midwest to its landmark factory that looms alongside Interstate 295. The loss of rail service will force the company to receive its beans by truck, which the company previously said would not be a “reasonable” option because it would increase its costs by six figures. On Wednesday, however, the company confirmed it would transition to trucks, the method it already uses to ship its final canned products.

“As a result of the railroad’s decision to cease rail service, B&M will transition the supply of raw materials from rail service to trucks,” said Ed Snook, plant manager for B&M Baked Beans, in a statement to the Press Herald. “B&M does not expect this to disrupt our operations or materially affect our business from a cost perspective or otherwise.”

The plant, which employs about 120 people, is the southern terminus of a 24-mile stretch of track that starts in Auburn and passes through New Gloucester, North Yarmouth, Yarmouth and Falmouth before entering Portland’s East Deering neighborhood. According to the railroad company, the route has become prohibitively expensive to operate over the last several years.

The railroad company notified the federal Surface Transportation Board on Monday that it intends to discontinue the service at the end of this month.

The St. Lawrence and Atlantic made a similar decision a year ago, but postponed canceling the service after B&M offered a one-time payment of $111,529 to subsidize it through Oct. 31, 2015.

While the parties negotiated to extend the subsidy arrangement, B&M’s parent company, Parsippany, N.J.-based B&G Foods North America Inc., ultimately decided against it, according to an account of the negotiations by Nathan Moulton, director of rail programs for the Maine Department of Transportation.

“B&G didn’t want to continue discussions around extending the agreement,” Moulton said. “I don’t know the reasons or details or the proposals that went back and forth.”

A lawyer for the railroad notified federal regulators in a letter dated Monday that the subsidy agreement with B&M would not be extended and asked the Surface Transportation Board to consider Nov. 1 the official date the rail service would be discontinued.

Michael Williams, vice president of communications for the St. Lawrence and Atlantic’s parent company, Genesee & Wyoming Railroad Services Inc., declined to comment, citing a policy that the company doesn’t comment on matters before the Surface Transportation Board.

Moulton said B&M’s business alone was not enough to make the rail line viable. He said efforts have been made to attract other customers to the line, but they have been unsuccessful.

In the late 1990s, the line served three customers that shipped 500 carloads a year, according to documents the railroad filed with federal regulators. By 2006, the B&M factory was its sole remaining customer, requiring only 30 carloads a year.

“B&M Beans’s current level of traffic does not justify the continued operation and maintenance of the line in safe operating condition,” the railroad’s attorney wrote in a letter in November 2013. “(The St. Lawrence and Atlantic) should not be required to continue what would clearly be unprofitable operations.”

B&G Foods objected, noting that it would incur a six-figure annual increase in transportation costs if it had to switch to trucks to deliver its beans.

In a letter to regulators on Dec. 17, 2013, B&M said “trucking is not a reasonable alternative because of the much higher cost.”

Despite B&M’s protests, federal regulators last year granted the railroad’s request to discontinue service along the route, saying “even using the data relied on by and most favorable to B&G, the record demonstrates that continued operation of the line would require (the St. Lawrence and Atlantic) to operate at a substantial net annual loss.”

The state acquired the land from the railroad for $6.8 million in two transactions, in 2006 and 2009. However, the railroad has a perpetual freight easement over the line, said Moulton. The railroad will maintain that easement after it stops freight service, which means the state could not look for another operator to offer freight service along the route.

In the end, though, Moulton doesn’t think that matters.

“The numbers are the numbers,” he said. “No one is going to be kicking down our door to operate this thing.”