Fog surrounds a trestle bridge on the Belfast Rail Trail on June 27, in Belfast. Credit: Courtesy of Aislinn Sarnacki

FRYEBURG, Maine — Maine is converting an inactive set of rail tracks into a new recreational trail that will run from the southern part of the state to close to the New Hampshire border.

Democratic Gov. Janet Mills has signed a bill to create the new walking and biking trail, which will stretch 40 miles from Standish to Fryeburg along the Mountain Division Rail Line. The new trail is designed to eventually connect with Portland at its eastern edge and New Hampshire in the west.

The cost to perform the work of removing the existing track and replacing it with an interim trail is estimated to be about $20.1 million, state records show. The bill directs the Maine Department of Transportation to do the work “subject to available funding resources, permitting and municipal agreements.”

Members of an advisory council that recommended the conversion believe the trail “is the best use of the corridor and the benefits of public access to the trail will be a major economic driver for tourism and recreation in the region,” said Paul Schumacher, who chaired the council.