Councils in Dorset are helping fund the relaunch of regular passenger train services between a popular seaside resort and the national mainline.
The first diesel-hauled train is due to run between Swanage and Wareham in June.
Purbeck District Council and Dorset County Council are among the railway's stakeholders who also include BP and £1.8m grant from the government's Coastal Communities Fund.
The new service will undergo a trial with four trains a day in each direction between Wareham, Corfe Castle and Swanage.
The original rail line, opened in 1885, was closed by British Rail and ripped up in 1972. It was reopened four years later and has been run as a tourist attraction since the 1990s.
The trial services will enable diesel trains run by Swanage Railway to connect with South West Trains services at Wareham on the Weymouth to London Waterloo line.
Trevor Parsons, chairman of the Swanage Railway Company said: ‘The trial public service will be historic because it has been Swanage Railway's ambition to return passenger trains to Wareham for more than 40 years - with several generations of volunteers working to achieve this.’